github-actions[bot] commented on code in PR #69611:
URL: https://github.com/apache/doris/pull/69611#discussion_r4374989186
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/AddColumnsOp.java:
##########
@@ -98,7 +98,7 @@ public void validate(ConnectContext ctx) throws UserException
{
columns = Lists.newArrayList();
for (ColumnDefinition columnDef : columnDefs) {
- Column col = columnDef.translateToCatalogStyle();
+ Column col = columnDef.translateToCatalogStyleForSchemaChange();
Review Comment:
[P1] Preserve DATETIME expressions in batch schema changes
On a MoW unique table, `ALTER TABLE t ADD COLUMN (ts DATETIME(6) NOT NULL
DEFAULT CURRENT_TIMESTAMP(6), x INT DEFAULT '0')` now stores the ALTER-time
`ts` in `realDefaultValue`. `OlapTableSink.createSchema()` sends it through
`ColumnToThrift`, which preserves `default_value_expr` only for
TIMESTAMP_NS/TIMESTAMPTZ. A later partial update that inserts a new key with
`ts` omitted and new rows allowed therefore reaches
`_generate_default_values_for_missing_cids()` with a literal and persists the
ALTER time instead of the load time; previously this batch conversion left
`CURRENT_TIMESTAMP(6)` intact. Preserve the DATETIME expression alongside the
materialized backfill default too, and cover a later partial insert in
regression tests.
--
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]