Rearrange SelectStatementContext constructor parameters#35497
Merged
terrymanu merged 2 commits intoapache:masterfrom May 23, 2025
Merged
Rearrange SelectStatementContext constructor parameters#35497terrymanu merged 2 commits intoapache:masterfrom
terrymanu merged 2 commits intoapache:masterfrom
Conversation
Member
terrymanu
commented
May 23, 2025
- Reorder parameters to improve readability and consistency across usage
- Update related test cases and classes to reflect the new constructor signature
- Adjust subquery context creation to match the new parameter order
- Reorder parameters to improve readability and consistency across usage - Update related test cases and classes to reflect the new constructor signature - Adjust subquery context creation to match the new parameter order
There was a problem hiding this comment.
Pull Request Overview
This PR reorders the constructor parameters for SelectStatementContext to improve readability and consistency across different usages. The changes update all relevant call sites in both main and test code, ensuring that the new parameter order is consistently applied.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| infra/binder/core/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/SelectStatementContext.java | Updated constructor parameter order and adjusted subquery context creation accordingly. |
| Other files (tests and DQL/DDL merger classes) | Updated all instantiations of SelectStatementContext to match the new constructor signature. |
|
|
||
| public SelectStatementContext(final ShardingSphereMetaData metaData, final DatabaseType databaseType, final List<Object> params, final SelectStatement sqlStatement, | ||
| final String currentDatabaseName, final Collection<TableSegment> inheritedTables) { | ||
| public SelectStatementContext(final DatabaseType databaseType, final SelectStatement sqlStatement, |
There was a problem hiding this comment.
Consider updating the constructor JavaDoc (or related documentation) to reflect the new parameter order for clarity.
- Reorder parameters to improve readability and consistency across usage - Update related test cases and classes to reflect the new constructor signature - Adjust subquery context creation to match the new parameter order
taojintianxia
approved these changes
May 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.