Skip to content

Implement op:bucket-group in Java API #1314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llinggit opened this issue Aug 16, 2021 · 2 comments
Closed

Implement op:bucket-group in Java API #1314

llinggit opened this issue Aug 16, 2021 · 2 comments

Comments

@llinggit
Copy link
Contributor

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?

@ehennum
Copy link
Contributor

ehennum commented Sep 20, 2021

I believe that the only thing missing is to write a unit test

@llinggit
Copy link
Contributor Author

Thanks, Erik. Will do.

llinggit pushed a commit to llinggit/java-client-api that referenced this issue Oct 5, 2021
…so modify makeMap to work with XsIntVal for fromSparql options.
llinggit pushed a commit that referenced this issue Oct 5, 2021
@llinggit llinggit added ship and removed test labels Oct 5, 2021
@llinggit llinggit closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants