You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/09/06 08:32:40 UTC

[PR] Fix PostgreSQL and openGauss CTE column alias parsing [shardingsphere]

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

   (no comment)


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix PostgreSQL and openGauss CTE column alias parsing [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39753:
URL: https://github.com/apache/shardingsphere/pull/39753#issuecomment-5558067933

   ### Result
   
   **Review Result: Mergeable**
   
   The local candidate fixes PostgreSQL and openGauss CTE column aliases with the agreed minimum scope. No blocking issue or unnecessary design expansion was found.
   
   ### Evidence
   
   - [PostgreSQLStatementVisitor.java:1062](/Users/zhangliang/IdeaProjects/shardingsphere/parser/sql/engine/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/engine/postgresql/visitor/statement/PostgreSQLStatementVisitor.java:1062) now preserves parsed CTE column names in `CommonTableExpressionSegment`.
   - [OpenGaussStatementVisitor.java:1028](/Users/zhangliang/IdeaProjects/shardingsphere/parser/sql/engine/dialect/opengauss/src/main/java/org/apache/shardingsphere/sql/parser/engine/opengauss/visitor/statement/OpenGaussStatementVisitor.java:1028) applies the same fix to openGauss.
   - [select-with.xml:27](/Users/zhangliang/IdeaProjects/shardingsphere/test/it/parser/src/main/resources/sql/supported/dml/select-with.xml:27) verifies both the no-alias path and the `cte(a,b)` AST for both dialects.
   - [e2e-dql-select-using-with-clause.xml:27](/Users/zhangliang/IdeaProjects/shardingsphere/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select-using-with-clause.xml:27) verifies that alias `j` resolves to `order_id` through the real Proxy routing and rewriting path.
   - The syntax is documented by both [PostgreSQL](https://www.postgresql.org/docs/current/sql-select.html) and [openGauss](https://docs.opengauss.org/en/docs/latest/sql_reference/select.html).
   
   | Verification | Result |
   | --- | --- |
   | PostgreSQL and openGauss parser ITs | Exit `0`; 2,106 tests passed |
   | PostgreSQL Cluster Proxy DQL E2E | Exit `0`; 296 tests passed |
   | openGauss Cluster Proxy DQL E2E | Exit `0`; 264 tests passed |
   | E2E Docker artifact build | Exit `0`; build succeeded |
   | File-filtered Spotless | Exit `0`; both visitors already formatted |
   | File-filtered Checkstyle | Exit `0`; zero violations |
   | `xmllint --noout` | Exit `0`; both XML files valid |
   | `git diff --check` | Exit `0` |
   
   ### Coverage
   
   - Candidate type: standalone local candidate.
   - Baseline: `0b72e79ac498be12a04e6ea2f7036f01232e6e49`.
   - Delta: 4 tracked files, 16 insertions and 4 deletions.
   - Root cause: both grammars already parsed the optional name list, but their visitors discarded it.
   - Blast radius: limited to PostgreSQL and openGauss CTE parsing plus focused parser and Proxy tests. No grammar, binder, public API, dependency, documentation, or configuration change.
   - Performance: only an existing linear column-list conversion is added when aliases are present; no I/O, cache, lock, or shared-state change.
   - Intentionally excluded: partial CTE alias lists and forced SQL Federation execution.
   - Unrelated `.codex/**/__pycache__/` files were left untouched.
   - All review passes completed with no unresolved findings.
   - This is a code-scope result; GitHub CI was not reviewed.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix PostgreSQL and openGauss CTE column alias parsing [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #39753:
URL: https://github.com/apache/shardingsphere/pull/39753


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org