xiedeyantu opened a new pull request, #21513: URL: https://github.com/apache/datafusion/pull/21513
## Which issue does this PR close? - Closes #. ## Rationale for this change PostgreSQL array literals should be rendered using `ARRAY[...]` syntax when unparsing SQL. Without this, roundtripped PostgreSQL SQL can lose the dialect-specific array form and emit a plain bracketed array literal instead. ## What changes are included in this PR? - Added a dialect hook to indicate whether array literals should render as `ARRAY[...]`. - Enabled that behavior for `PostgreSqlDialect`. - Updated the SQL unparser to honor the dialect setting when rendering array expressions. - Adjusted the PostgreSQL roundtrip test to expect `ARRAY[1, 2, 3, 4, 5]`. ## Are these changes tested? Yes. The PostgreSQL roundtrip test in plan_to_sql.rs covers the array literal case and verifies the unparsed SQL now uses `ARRAY[...]`. ## Are there any user-facing changes? Yes. PostgreSQL SQL generated by DataFusion will now emit array literals in `ARRAY[...]` form instead of plain bracketed form. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
