Skip to content

Expose the 3rd parameter of op.fromSPARQL #1316

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 31, 2021 · 3 comments
Closed

Expose the 3rd parameter of op.fromSPARQL #1316

llinggit opened this issue Aug 31, 2021 · 3 comments

Comments

@llinggit
Copy link
Contributor

This is for bug 56465. The new 3rd parameter is options, which could be dedup or base. Need to expose this parameter in Java Client API.

const op = require('/MarkLogic/optic');
op.fromSPARQL('PREFIX ad: http://marklogicsparql.com/addressbook# '+
'SELECT ?firstName '+
'WHERE {<#5555> ad:firstName ?firstName .}'
, 'sparql', {dedup:'on',base:'http://marklogicsparql.com/id#'})
.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 using PlanBuilder.sparqlOptions()

@llinggit
Copy link
Contributor Author

OK, will add.

@llinggit llinggit added test and removed new labels Sep 20, 2021
@llinggit
Copy link
Contributor Author

llinggit commented Oct 5, 2021

When setting duplicate to true, it works, but when setting it to false, it returns 6 results instead of 2.

PlanSparqlOptions options = pb.sparqlOptions().withDeduplicated(false).withBase("http://marklogicsparql.com/id#");

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 to llinggit/java-client-api that referenced this issue Oct 5, 2021
llinggit pushed a commit that referenced this issue Oct 5, 2021
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