Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Jan 2, 2026

This isn't quite done - I want to do a PR for excluding XML next, and then refactor the code, likely moving the tests into a new test class. But this pushes things forward a bit with exclusions.

@rjrudin rjrudin requested a review from BillFarber as a code owner January 2, 2026 20:19
Copilot AI review requested due to automatic review settings January 2, 2026 20:19
@rjrudin rjrudin requested a review from stevebio as a code owner January 2, 2026 20:19
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Copyright Validation Results
Total: 5 | Passed: 5 | Failed: 0 | Skipped: 0 | at: 2026-01-02 23:14:39 UTC | commit: 6c5b7ec

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/ContentExclusionUtil.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteEvalFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteOpticFilter.java
  • marklogic-client-api/src/test/java/com/marklogic/client/datamovement/filter/IncrementalWriteTest.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 introduces initial support for excluding specific JSON properties from hash calculations in the incremental write filter. The feature allows users to specify JSON Pointer expressions (RFC 6901) to exclude fields like timestamps or metadata from change detection, preventing unnecessary document rewrites when only these excluded fields change.

Key changes:

  • Added jsonExclusions parameter throughout the IncrementalWriteFilter class hierarchy to support exclusion configuration
  • Implemented ContentExclusionUtil class to handle JSON Pointer-based exclusions using Jackson's API
  • Added comprehensive test coverage demonstrating exclusion behavior with multiple write scenarios

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
IncrementalWriteTest.java Adds test case validating JSON exclusion behavior across three scenarios: initial write, excluded field changes, and non-excluded content changes
IncrementalWriteFilter.java Adds jsonExclusions builder method and integrates exclusion logic into content serialization
IncrementalWriteOpticFilter.java Updates constructor to accept and forward jsonExclusions parameter
IncrementalWriteEvalFilter.java Updates constructor to accept and forward jsonExclusions parameter
ContentExclusionUtil.java New utility class implementing JSON Pointer-based node removal with parent navigation and logging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

BillFarber
BillFarber previously approved these changes Jan 2, 2026
This isn't quite done - I want to do a PR for excluding XML next, and then refactor the code, likely moving the tests into a new test class. But this pushes things forward a bit with exclusions.
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