cangen185-sudo opened a new pull request, #40201: URL: https://github.com/apache/shardingsphere/pull/40201
Fixes #40194. Changes proposed in this pull request: - Limit PostgreSQL statement `Describe` output to the bound visible projections when a SELECT has derived projections. For example, `SELECT id FROM t_order ORDER BY k` must describe one column even if its rewritten backend query also selects `ORDER_BY_DERIVED_0`. - Use the same visible projection count already used by `StandardDatabaseProxyConnector`, keeping statement descriptions consistent with portal descriptions and row data. Keep JDBC column indexes, names and type OIDs; do not filter by column-name prefixes. - Add regressions for ORDER BY, AVG helper columns, expanded shorthand projections and a legitimate alias resembling a derived column. Add the 5.5.4 release note. Ordinary SELECT and non-SELECT metadata, cached descriptions, INSERT RETURNING, parameter inference and NoData handling retain their existing paths. No public API, routing or SPI change is included. ### Validation - Original `PostgreSQLComDescribeExecutorTest` baseline: 20 passed. The four new cases failed on the original implementation because it described 2/3/5/2 columns instead of 1/1/4/1. - Native PostgreSQL frontend module: **205 tests passed**, 0 failures/errors/skips. Production/test compilation, packaging and installation passed. - `spotless:check checkstyle:check -Pcheck` with exact filters covering both changed Java files passed; Checkstyle reported no errors and retained three non-blocking complexity/coupling warnings. Apache RAT approved all 59 module resources, with no unknown or unapproved licenses. - An additional local PostgreSQL 18.6 / pgjdbc 42.7.13 probe tested real JDBC metadata and serialization of the source-built `PostgreSQLComDescribeExecutor` output: four failures on the original artifact, then **six passed** on the patched artifact, including ordinary SELECT and non-SELECT controls. Routing/binding context was mocked in this boundary probe; it was not a complete deployed Proxy-cluster test. - Windows 11, Microsoft OpenJDK 21.0.12.1, Maven 3.9.11. Dependencies were built from the same source revision through the native 282-project reactor before the focused module tests. This does not claim that all 282 projects' test suites ran. The checked-in regressions run with: `mvn -B -ntp -pl proxy/frontend/dialect/postgresql -Dtest=PostgreSQLComDescribeExecutorTest test` AI assistance: Codex assisted with the two Java files, the release-note entry, investigation and local validation. The final diff and its projection-count contract received bounded independent read-only review. The contributor remains responsible for the change. --- Before submitting this PR, I confirm that: - [x] My code follows the project's code of conduct. - [x] I have reviewed my changes. - [x] Please add the appropriate bug/Proxy/PostgreSQL labels; I cannot assign upstream labels. - [ ] Full-repository `./mvnw clean install -B -T1C -Pcheck` (scoped native validation is detailed above; full-repository CI remains pending). - [x] Documentation applicability was checked; this repairs existing protocol behavior without changing configuration or API. - [x] I have added unit tests for the change. - [x] I have updated the current development release notes. - [x] I have disclosed material AI assistance and its scope. -- 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]
