Skip to content

fix: correct JSON serialization of CloneQueryMode - #20557

Merged
FrankChen021 merged 1 commit into
apache:masterfrom
FrankChen021:codex/fix-clone-query-mode-json
Oct 13, 2026
Merged

FrankChen021 merged 1 commit into
apache:masterfrom
FrankChen021:codex/fix-clone-query-mode-json

Conversation

@FrankChen021

Copy link
Copy Markdown
Member

Description

CloneQueryMode serializes as its constant name (PREFERCLONES), but its @JsonCreator only accepts preferClones, so a serialized value can't be read back. This annotates toString() with @JsonValue so both directions use preferClones.

Query context reads are unaffected, since they parse the string case-insensitively.


This PR has:

  • been self-reviewed.
  • added unit tests or modified existing tests to cover new code paths.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 11, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 11, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 12, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. The new @JsonValue annotation aligns Jackson serialization with the existing @JsonCreator and documented lower-camel values; query-context parsing remains unaffected.

Reviewed 2 of 2 changed files.

Validation: git diff --check bb50f29b1d792c7b82e48dd24435be5966e8b269...810bc194ba7aa93676f8b920f3d1501d767cfe92 passed. No tests or builds were run.


This is an automated review by Codex GPT-5.6-Luna(max)

@FrankChen021
FrankChen021 merged commit 308c949 into apache:master Oct 13, 2026
27 checks passed
@FrankChen021
FrankChen021 deleted the codex/fix-clone-query-mode-json branch October 13, 2026 05:58
@github-actions github-actions Bot added this to the 39.0.0 milestone Oct 13, 2026
FrankChen021 added a commit to FrankChen021/druid that referenced this pull request Oct 13, 2026
… form

Also fixes CloneQueryMode's JSON serialization, which the check catches (same change as apache#20557).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants