counting bug? :)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

counting bug? :)

ihe Onwuka
Where's the emoticon for a halo when you need one.

Here is a slightly edited version of my eXide screen

xquery version "3.0";
(collection('/db/apps/spark/data/rtUnmatched')//thing,collection('/db/apps/spark/data/rtID')//thing)/count(.)


Outline

 Live Preview
Showing results 1 to 1 of 1
87567

when I run the same with the map operator as in ! count(.) instead of
/count(.) it emits a stream of ones so presumably it counts a 1 for
each element it encounters.

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: counting bug? :)

Wolfgang Meier-2
> xquery version "3.0";
> (collection('/db/apps/spark/data/rtUnmatched')//thing,collection('/db/apps/spark/data/rtID')//thing)/count(.)

This should return a sequence of 1 as the simplified version correctly does:

(<a/>, <b/>, <c/>)/count(.)

Probably count() optimizes too much here. Will check.

Wolfgang
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: counting bug? :)

Wolfgang Meier-2
> This should return a sequence of 1 as the simplified version correctly does:
>
> (<a/>, <b/>, <c/>)/count(.)
>
> Probably count() optimizes too much here. Will check.

This was fairly easy to fix:

https://github.com/eXist-db/exist/pull/190

Wolfgang
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open