Zhengcy05 opened a new pull request, #38989:
URL: https://github.com/apache/shardingsphere/pull/38989

   ## Background
   fixed #38643
   This PR fixes derived table alias columns for PostgreSQL `VALUES` subqueries.
   
   ## Changes
   - preserve the alias name and alias column list separately in `AliasSegment` 
instead of flattening `t(col1, col2)` into a single alias string
   - generate projections for PostgreSQL `VALUES` subqueries so downstream 
binder logic can bind derived table columns by position
   - bind alias column lists from `AS t(col1, col2)` in 
`SubqueryTableSegmentBinder` with column count validation preserved
   - add regression tests for PostgreSQL statement visitor and subquery table 
binder covering both successful binding and mismatched column count
   
   ## Validation
   - `./mvnw spotless:apply -Pcheck -T1C`
   - `./mvnw checkstyle:check -Pcheck -T1C`
   - `./mvnw -pl infra/binder/core -am -Dspotless.skip=true 
-Dtest=SubqueryTableSegmentBinderTest -Dsurefire.failIfNoSpecifiedTests=false 
test`
   - `./mvnw -pl parser/sql/engine/dialect/postgresql -am -Dspotless.skip=true 
-Dtest=PostgreSQLStatementVisitorTest -Dsurefire.failIfNoSpecifiedTests=false 
test`
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] 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.
   - [x] 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](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to