Skip to content

MLE-23473 Implement fromDocs#1898

Merged
stevebio merged 1 commit intodevelopfrom
feature/MLE-23743-implement-fromDocs
Feb 11, 2026
Merged

MLE-23473 Implement fromDocs#1898
stevebio merged 1 commit intodevelopfrom
feature/MLE-23743-implement-fromDocs

Conversation

@stevebio
Copy link

Add implementation of optic fromDocs to java client. Includes new context method to indicate current row for expressions.

Copilot AI review requested due to automatic review settings February 10, 2026 20:44
@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Copyright Validation Results
Total: 18 | Passed: 8 | Failed: 0 | Skipped: 10 | at: 2026-02-11 21:00:15 UTC | commit: 0f9b30c

⏭️ Skipped (Excluded) Files

  • test-app/src/main/ml-data/optic/locations/collections.properties
  • test-app/src/main/ml-data/optic/locations/new-york.json
  • test-app/src/main/ml-data/optic/locations/permissions.properties
  • test-app/src/main/ml-data/optic/locations/portland.json
  • test-app/src/main/ml-data/optic/locations/san-francisco.json
  • test-app/src/main/ml-data/optic/locations/seattle.json
  • test-app/src/main/ml-data/optic/widgets/alpha.json
  • test-app/src/main/ml-data/optic/widgets/beta.json
  • test-app/src/main/ml-data/optic/widgets/collections.properties
  • test-app/src/main/ml-data/optic/widgets/permissions.properties

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java
  • marklogic-client-api/src/main/java/com/marklogic/client/expression/VecExpr.java
  • marklogic-client-api/src/main/java/com/marklogic/client/impl/ColumnBuilderImpl.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/PlanColumnBuilder.java
  • marklogic-client-api/src/main/java/com/marklogic/client/type/PlanContextExprCall.java
  • marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocsTest.java

✅ All files have valid copyright headers!

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 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() and context() 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.

@stevebio stevebio force-pushed the feature/MLE-23743-implement-fromDocs branch 4 times, most recently from 423bdb8 to 6a3e239 Compare February 11, 2026 19:23
@stevebio stevebio requested a review from rjrudin February 11, 2026 20:03
rjrudin
rjrudin previously approved these changes Feb 11, 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.

Couple tweaks and then merge away!

Add implementation of optic fromDocs to java client. Includes new context method to indicate current row for expressions.

a
@stevebio stevebio force-pushed the feature/MLE-23743-implement-fromDocs branch from 6a3e239 to 0f9b30c Compare February 11, 2026 21:00
@stevebio stevebio merged commit 0c9e89a into develop Feb 11, 2026
4 checks passed
@stevebio stevebio deleted the feature/MLE-23743-implement-fromDocs branch February 11, 2026 21:27
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.

2 participants