Skip to content

PHOENIX-7937 Trim whitespace in EXPLAIN FORMAT JSON scan attributes - #2546

Merged
apurtell merged 2 commits into
apache:PHOENIX-7876-featurefrom
apurtell:PHOENIX-7937
Jun 25, 2026
Merged

PHOENIX-7937 Trim whitespace in EXPLAIN FORMAT JSON scan attributes#2546
apurtell merged 2 commits into
apache:PHOENIX-7876-featurefrom
apurtell:PHOENIX-7937

Conversation

@apurtell

Copy link
Copy Markdown
Contributor

Trim scan attribute string values before populating ExplainPlanAttributes. Text plan is unchanged. The JSON field values are canonicalized.

Co-authored-by: Claude Opus 4.8[1m] noreply@anthropic.com

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 canonicalizes (trims) whitespace in scan-related string fields when populating ExplainPlanAttributes for EXPLAIN FORMAT JSON, while keeping the human-readable/text explain output unchanged.

Changes:

  • Trim explainScanType before storing it in ExplainPlanAttributes.
  • Trim keyRanges before storing it in ExplainPlanAttributes.
  • Update/adjust JSON-baseline expectations in ExplainPlanTest to match the canonicalized output.

Reviewed changes

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

File Description
phoenix-core/src/test/java/org/apache/phoenix/query/explain/ExplainPlanTest.java Updates expected JSON attributes to match trimmed/canonical scan attribute strings; trims inputs in helper used to build expected scan JSON.
phoenix-core-client/src/main/java/org/apache/phoenix/iterate/ExplainTable.java Trims scan attribute string values (explainScanType, keyRanges) when populating ExplainPlanAttributes for JSON output.

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

@apurtell
apurtell merged commit 879e159 into apache:PHOENIX-7876-feature Jun 25, 2026
@apurtell
apurtell deleted the PHOENIX-7937 branch June 25, 2026 15:39
apurtell added a commit to apurtell/phoenix that referenced this pull request Jun 25, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
apurtell added a commit to apurtell/phoenix that referenced this pull request Jun 25, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
apurtell added a commit to apurtell/phoenix that referenced this pull request Jun 25, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
@apurtell

Copy link
Copy Markdown
Contributor Author

This one is annoying because it had a much larger silly impact on tests than expected, and sometimes you just have to grab the IDE and do it by hand. I think I have a handle on it now.

apurtell added a commit to apurtell/phoenix that referenced this pull request Jun 26, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
apurtell added a commit to apurtell/phoenix that referenced this pull request Jun 28, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
asf-gitbox-commits pushed a commit that referenced this pull request Jul 24, 2026
…2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
apurtell added a commit to apurtell/phoenix that referenced this pull request Aug 4, 2026
…pache#2546)

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
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