-
Notifications
You must be signed in to change notification settings - Fork 74
MLE-25585 implement optic transitive closure in java client. #1883
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
Conversation
|
Copyright Validation Results ⏭️ Skipped (Excluded) Files
✅ Valid Files
✅ All files have valid copyright headers! |
c816ac2 to
635d244
Compare
rjrudin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I just noted some things that can be deleted and some warnings that IntelliJ flagged.
marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java
Show resolved
Hide resolved
marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderImpl.java
Outdated
Show resolved
Hide resolved
...ogic-client-api/src/main/java/com/marklogic/client/type/PlanTransitiveClosureOptionsSeq.java
Outdated
Show resolved
Hide resolved
test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml
Show resolved
Hide resolved
...ogic-client-api/src/test/java/com/marklogic/client/test/rows/OpticTransitiveClosureTest.java
Show resolved
Hide resolved
...ogic-client-api/src/test/java/com/marklogic/client/test/rows/OpticTransitiveClosureTest.java
Outdated
Show resolved
Hide resolved
d1b05d9 to
975d7ea
Compare
975d7ea to
4705ad0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the optic transitiveClosure function in the MarkLogic Java client API to support graph traversal operations for identifying reachable node pairs through transitive relationships. This aligns with MarkLogic 12's new transitive closure functionality, similar to SPARQL's one-or-more (+) operator.
Changes:
- Added Java API methods for
transitiveClosurewith multiple overloads supporting string and column parameters, with optional configuration throughPlanTransitiveClosureOptions - Created
PlanTransitiveClosureOptionsinterface and implementation to configure minimum and maximum path lengths - Added comprehensive test suite with 8 test cases covering various transitive closure scenarios including options, joins, and SPARQL integration
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml | Test data containing parent-child relationship triples and labels for transitive closure tests |
| test-app/src/main/ml-data/optic/transitive-closure/permissions.properties | Permission configuration for test data |
| test-app/src/main/ml-data/optic/transitive-closure/collections.properties | Collection assignment for test data |
| marklogic-client-api/src/test/java/com/marklogic/client/test/rows/OpticTransitiveClosureTest.java | Test suite with 8 test cases validating transitive closure functionality |
| marklogic-client-api/src/main/java/com/marklogic/client/type/PlanTransitiveClosureOptions.java | Interface defining configuration options for transitive closure operations |
| marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderSubImpl.java | Implementation of PlanTransitiveClosureOptions and map conversion logic |
| marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderImpl.java | Core implementation of transitiveClosure methods with parameter validation |
| marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilderBase.java | Added transitiveClosureOptions factory method |
| marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java | Public API interface declarations for transitiveClosure methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java
Show resolved
Hide resolved
rjrudin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and good to know that the Java code generator can still be useful for some of these new functions.
Add generated code with minor changes. Add tests for op.transitiveClosure. Add triple data for tests. Some copyright header fixes.
4705ad0 to
c6fe17d
Compare
Add implementation of optic transitiveClosure function in marklogic java client api.
Add triple data for tests.
Add xdmp generated code with minor changes.
Add tests for op.transitiveClosure.