> I don't understand why. In my example it wouldn't. The count functions could
> the number of empty objects or objects that contain only the STREET field.
I've looked into the test and here are the issues:
1) The fn:count() does not have the %explores-json annotation. I've confused it
with the JSONiq array size() function.
2) Currently the dataguide does not distinguish between any of the fn:
functions. So for example if you modify the query:
for $obj in parse-json(f:read-text(fn:resolve-uri("citylots-small.json")))
group by $s := $obj.STREET
street : $s,
count : count($obj),
seq : subsequence($obj, 1, 100)
then if you prune the input to have only the .STREET field you'll get an
incorrect result. So currently the argument to subsequence() is "explored" and
so the dataguide is "*" in this case. The same happens with count().
3) fn:count() is a special case as it only cares for the number of objects and
not their contents. I think another annotation could be added, which would be
the opposite of %explores-json and which would indicate that the function
ignores the details of the object. Or I could just add some code in the
dataguide collection to handle fn:count() separately.
Your team Zorba Coders is subscribed to branch lp:zorba.
Mailing list: https://launchpad.net/~zorba-coders
Post to : email@example.com
Unsubscribe : https://launchpad.net/~zorba-coders
More help : https://help.launchpad.net/ListHelp