Skip to content

[FLINK-39228][starrocks] Escape quoted default/comment literals in DDL#4308

Open
zml1206 wants to merge 2 commits intoapache:masterfrom
zml1206:escape_quoted
Open

[FLINK-39228][starrocks] Escape quoted default/comment literals in DDL#4308
zml1206 wants to merge 2 commits intoapache:masterfrom
zml1206:escape_quoted

Conversation

@zml1206
Copy link
Copy Markdown
Contributor

@zml1206 zml1206 commented Mar 9, 2026

Rewrite buildColumnStmt for create table, add column and alter column type.

@zml1206 zml1206 marked this pull request as draft March 9, 2026 07:01
@zml1206 zml1206 changed the title [starrocks] Escape quoted default/comment literals in DDL [FLINK-39228][starrocks] Escape quoted default/comment literals in DDL Mar 9, 2026
@zml1206 zml1206 marked this pull request as ready for review March 9, 2026 07:49
@zml1206
Copy link
Copy Markdown
Contributor Author

zml1206 commented Apr 23, 2026

cc @lvyanquan

LOG.info(
"Success to create table {}.{}, sql: {}",
table.getDatabaseName(),
table.getDatabaseName(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table.getDatabaseName() => table.getTableName()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

.column(new PhysicalColumn("name", DataTypes.VARCHAR(17), null))
.column(
new PhysicalColumn(
"name", DataTypes.VARCHAR(17), "\"name\"", "\"\""))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add test cases for default values/comments containing '\'?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants