Skip to content

Conversation

@stevebio
Copy link

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.

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Copyright Validation Results
Total: 9 | Passed: 6 | Failed: 0 | Skipped: 3 | at: 2026-01-21 16:21:54 UTC | commit: c6fe17d

⏭️ Skipped (Excluded) Files

  • test-app/src/main/ml-data/optic/transitive-closure/collections.properties
  • test-app/src/main/ml-data/optic/transitive-closure/permissions.properties
  • test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java
  • marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilderBase.java
  • marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderImpl.java
  • marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderSubImpl.java
  • marklogic-client-api/src/main/java/com/marklogic/client/type/PlanTransitiveClosureOptions.java
  • marklogic-client-api/src/test/java/com/marklogic/client/test/rows/OpticTransitiveClosureTest.java

✅ All files have valid copyright headers!

@stevebio stevebio force-pushed the feature/25585-add-optic-transitiveClosure branch 3 times, most recently from c816ac2 to 635d244 Compare January 16, 2026 22:13
rjrudin
rjrudin previously approved these changes Jan 20, 2026
Copy link
Contributor

@rjrudin rjrudin left a 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.

@stevebio stevebio force-pushed the feature/25585-add-optic-transitiveClosure branch 2 times, most recently from d1b05d9 to 975d7ea Compare January 20, 2026 19:24
@stevebio stevebio force-pushed the feature/25585-add-optic-transitiveClosure branch from 975d7ea to 4705ad0 Compare January 21, 2026 00:40
@stevebio stevebio marked this pull request as ready for review January 21, 2026 16:15
@stevebio stevebio requested a review from BillFarber as a code owner January 21, 2026 16:15
Copilot AI review requested due to automatic review settings January 21, 2026 16:15
Copy link

Copilot AI left a 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 transitiveClosure with multiple overloads supporting string and column parameters, with optional configuration through PlanTransitiveClosureOptions
  • Created PlanTransitiveClosureOptions interface 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.

Copy link
Contributor

@rjrudin rjrudin left a 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.
@stevebio stevebio force-pushed the feature/25585-add-optic-transitiveClosure branch from 4705ad0 to c6fe17d Compare January 21, 2026 16:21
@stevebio stevebio merged commit 8296692 into develop Jan 21, 2026
3 checks passed
@stevebio stevebio deleted the feature/25585-add-optic-transitiveClosure branch January 21, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants