yuqi1129 opened a new pull request, #13976:
URL: https://github.com/apache/gravitino/pull/13976

   ### What changes were proposed in this pull request?
   
   - Doris: escape property keys and values in ALTER TABLE `SetProperty`, as 
CREATE TABLE already does.
   - StarRocks: escape property keys and values on CREATE TABLE, CREATE 
DATABASE and ALTER TABLE `SetProperty`. Unescape properties parsed from `SHOW 
CREATE TABLE`, as Doris does.
   
   ### Why are the changes needed?
   
   Unescaped keys and values make a double quote break the statement or change 
it. On StarRocks the key is affected too: any key with the `dynamic_partition.` 
or `binlog.` prefix passes the alterable-property check.
   
   Fix: #13974
   
   ### Does this PR introduce _any_ user-facing change?
   
   Property keys and values containing quotes or backslashes are written as 
escaped literals instead of producing invalid SQL. No API or property key 
changes.
   
   ### How was this patch tested?
   
   - New SQL-generation cases for Doris and StarRocks `SetProperty`, plus 
StarRocks `generatePropertiesSql` / `extractPropertiesFromSql` escaping cases.
   - `./gradlew :catalogs:catalog-jdbc-doris:test 
:catalogs:catalog-jdbc-starrocks:test -PskipITs`
   - The Docker ITs were not run locally.
   


-- 
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