yuqi1129 opened a new pull request, #12007: URL: https://github.com/apache/gravitino/pull/12007
### What changes were proposed in this pull request? - Add a shared utility for escaping SQL string literal content. - Escape table, column, and schema comments in generated JDBC DDL. - Apply the escaping to MySQL, PostgreSQL, Doris, and StarRocks operations. - Add regression tests covering quotes, backslashes, semicolons, and SQL comment tokens. ### Why are the changes needed? JDBC catalog comments were inserted directly into generated DDL statements. Comments containing quotes could produce malformed SQL or change the structure of the generated statement. The change ensures comment content remains inside its SQL string literal. ### Does this PR introduce _any_ user-facing change? Yes. JDBC table, column, and PostgreSQL schema comments containing quotes or backslashes are now handled correctly. There is no API or configuration change. ### How was this patch tested? - `./gradlew spotlessApply` - `env SKIP_DOCKER_TESTS=true ./gradlew :catalogs:catalog-jdbc-common:test :catalogs:catalog-jdbc-mysql:test :catalogs:catalog-jdbc-postgresql:test :catalogs:catalog-jdbc-doris:test :catalogs:catalog-jdbc-starrocks:test -PskipITs -PskipDockerTests=true` -- 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]
