Conversation
|
Copyright Validation Results ⏭️ Skipped (Excluded) Files
✅ Valid Files
✅ All files have valid copyright headers! |
There was a problem hiding this comment.
Pull request overview
This PR implements the fromDocs optic operation for the Java client, enabling dynamic mapping of semi-structured data (JSON/XML) into rows and columns without requiring TDE template deployment. This provides ad-hoc query capabilities similar to Virtual Template Views with enhanced flexibility.
Changes:
- Adds
fromDocs()methods with multiple overloads to support different parameter combinations - Introduces
columnBuilder()andcontext()helper functions for defining column specifications and accessing current row context - Implements new types:
PlanColumnBuilder,PlanContextExprCall, and their sequence variants
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| FromDocsTest.java | Comprehensive test suite covering basic usage, default values, expressions, geospatial queries, and vector operations with fromDocs |
| PlanContextExprCallSeq.java | Interface for sequence of context expression calls |
| PlanContextExprCall.java | Interface for individual context expression call instances |
| PlanColumnBuilderSeq.java | Interface for sequence of column builders |
| PlanColumnBuilder.java | Main interface defining column builder API with methods for xpath, type, nullable, expr, defaultValue, collation, dimension, and coordinateSystem |
| PlanBuilderSubImpl.java | Adds "from-docs" to the list of supported accessor constructors |
| PlanBuilderImpl.java | Implements fromDocs methods with validation, columnBuilder/context factory methods, xpath overloads, and internal implementation classes |
| ColumnBuilderImpl.java | Concrete implementation of PlanColumnBuilder using builder pattern with immutable operations |
| PlanBuilder.java | Public API declarations for fromDocs, columnBuilder, context, and xpath methods with comprehensive documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderImpl.java
Outdated
Show resolved
Hide resolved
marklogic-client-api/src/main/java/com/marklogic/client/type/PlanColumnBuilderSeq.java
Outdated
Show resolved
Hide resolved
marklogic-client-api/src/main/java/com/marklogic/client/type/PlanContextExprCallSeq.java
Outdated
Show resolved
Hide resolved
marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocsTest.java
Outdated
Show resolved
Hide resolved
marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocsTest.java
Outdated
Show resolved
Hide resolved
423bdb8 to
6a3e239
Compare
rjrudin
left a comment
There was a problem hiding this comment.
Couple tweaks and then merge away!
marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java
Outdated
Show resolved
Hide resolved
marklogic-client-api/src/main/java/com/marklogic/client/type/PlanColumnBuilder.java
Outdated
Show resolved
Hide resolved
Add implementation of optic fromDocs to java client. Includes new context method to indicate current row for expressions. a
6a3e239 to
0f9b30c
Compare
Add implementation of optic fromDocs to java client. Includes new context method to indicate current row for expressions.