yuqi1129 opened a new issue, #13969:
URL: https://github.com/apache/gravitino/issues/13969
### Version
main branch
### Describe what's wrong
Doris and StarRocks interpolate range partition bounds and list partition
values directly into double-quoted SQL strings. Embedded double quotes break
the DDL, and backslashes can change the value interpreted by the database.
The same helpers are used when creating tables with assigned partitions and
when adding partitions. Both single-column list values and multi-column tuples
are affected. Doris also renders explicit lower/upper range bounds through this
path.
### Error message and/or stacktrace
Creating or adding a list partition for a value such as `say "hi"` produces
malformed SQL, for example `VALUES IN ("say "hi"")`, and the database rejects
the DDL.
### How to reproduce
1. Use a Doris or StarRocks JDBC catalog and a table partitioned by LIST on
a VARCHAR column.
2. Create the table with a partition whose value contains a double quote, or
add such a partition afterward.
3. Observe the database syntax error. Backslashes in partition values may
also be interpreted as escape sequences rather than preserved.
### Additional context
Escape each partition value with the existing JDBC SQL literal helper before
adding double-quote delimiters. Cover all range-bound and list-tuple rendering
paths while preserving existing MAXVALUE and numeric/date behavior.
--
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]