Skip to content

Fix select * is not supported for associated query#39131

Open
ClaireLytt wants to merge 1 commit into
apache:masterfrom
ClaireLytt:select
Open

Fix select * is not supported for associated query#39131
ClaireLytt wants to merge 1 commit into
apache:masterfrom
ClaireLytt:select

Conversation

@ClaireLytt

Copy link
Copy Markdown
Contributor

Fixes #28841

Changes proposed in this pull request:


Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@ClaireLytt

Copy link
Copy Markdown
Contributor Author

Add e2e test cases to reproduce the issue

After implementing the fix

@terrymanu terrymanu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Summary

Review Result: Not Mergeable

Feedback Mode: Change Request

Reason: The implementation direction aligns with the confirmed column-label mapping root cause, but the committed regression test does not exercise the reproduced failing path.

Issues

P1: Commit the actual #28841 reproduction path

  • Problem: The added case at e2e-dql-select-join.xml:136 is a plain single-table query. It covers neither the original mixed A.column, B.* join from #28841 nor the later HintManager trigger. The committed runner simply executes this SQL normally at GeneralDQLE2EIT.java:121. Public issue evidence reports that the single-table pattern succeeds without HintManager and fails with it (discussion). The PR’s failing screenshot invokes assertIssue28841WithHintManager and assertColumnLabelAccessibleAfterNext, but neither method nor equivalent setup exists at the latest head.
  • Impact: The committed test does not reproduce the demonstrated failure, so the new metadata-map merge behavior can regress while the added case remains green.
  • Required Change: Please commit a deterministic regression test that fails at the merge-base and passes with this fix—either the original mixed-projection join and topology from #28841 or the actual HintManager path shown in the public reproduction. Preserve label-based ResultSet access so the assertion verifies the missing-column-label behavior.

Review Details

  • Review Focus: Code Correctness Review. CI not reviewed by request.
  • Reviewed Scope: RELEASE-NOTES.md, JDBC result-set mapping, and the SQL E2E case at latest head 938b331dc40e7f21ca6612133cc81b8e9a2fa9ca; PR base master at 1a7d3e67b3bb628db3f43f6b1f82c1274f5b4983; local merge-base 7568693e8ee02637a47d3cca8acbf449797932e5. The local triple-dot file list matched all three GitHub /pulls/39131/files entries.
  • Not Reviewed Scope: GitHub Actions and CI; no local database E2E or Maven execution was performed.
  • Verification: Latest-head XML validation passed (xmllint, exit 0). Latest-head source inspection confirmed that no committed HintManager reproduction harness exists. PR metadata, files, commits, issue comments, PR comments, and reviews were fetched through authenticated REST. The GitHub app connector was unavailable, but the fallback supplied every required endpoint, so there is no evidence-access gap.
  • Release Note / User Docs: The release-note entry is present. Additional user documentation is not required because this fix introduces no configuration, migration, or public API change.

@ClaireLytt

Copy link
Copy Markdown
Contributor Author

@terrymanu
Thanks for the review. Please check the HintManager / column-label path in GeneralDQLE2EIT.

  • I tried multiple times, but could not reproduce the failure with:
SELECT o.user_id, i.* FROM t_order o JOIN t_order_item i ON o.order_id = i.order_id WHERE o.order_id = ?
  • The only pattern I can reproduce reliably is:
SELECT T.*, T.status status_new FROM t_order T WHERE T.order_id = 1000

with HintManager.setDataSourceName(...) and label-based ResultSet.getObject(...).

  • This is also the SQL used in the latest public reproduction comment on #28841, so the current test follows that path.

  • For the next commit, would you prefer that I remove the HintManager-related code from GeneralDQLE2EIT, and keep only the core fix plus dedicated unit/regression tests?

@ClaireLytt ClaireLytt closed this Jul 21, 2026
@ClaireLytt ClaireLytt reopened this Jul 21, 2026
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.

select * is not supported for associated query

2 participants