Implement op:bucket-group in Java API
llinggit opened this issue · 2 comments
In 10.0-8 we have this new function in optic and we need to expose it in Java Client API as well.
https://bugtrack.marklogic.com/56728
A sample query looks like below
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-literals((
map:entry("r",1)=>map:with("c1","a")=>map:with("c2",1)=>map:with("c3","m"),
map:entry("r",2)=>map:with("c1","b")=>map:with("c2",1) ,
map:entry("r",3)=>map:with("c1","a") =>map:with("c3","n"),
map:entry("r",4) =>map:with("c2",3)=>map:with("c3","o"),
map:entry("r",5)=>map:with("c1","b") ,
map:entry("r",6) =>map:with("c2",5) ,
map:entry("r",7) =>map:with("c3","p"),
map:entry("r",8)=>map:with("c1","b")=>map:with("c2",1)=>map:with("c3","q")
))
=> op:group-to-arrays(
op:bucket-group("rBucket", op:col("r"), (2,4)),
op:count("numRows")
)
=> op:result()
So we can address your issue, please include the following:
Version of MarkLogic Java Client API
See Readme.txt
Version of MarkLogic Server
See admin gui on port 8001 or run xdmp:version() in Query Console - port 8000)
Java version
Run java -version
OS and version
For MAC, run sw_vers.
For Windows, run systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
For Linux, run cat /etc/os-release and uname -r
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
Expected output: What specifically did you expect to happen?
Alternatives: What else have you tried, actual/expected?
I believe that the only thing missing is to write a unit test
Thanks, Erik. Will do.