morrySnow commented on code in PR #65858:
URL: https://github.com/apache/doris/pull/65858#discussion_r3702083828


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java:
##########
@@ -476,6 +480,38 @@ private static Map<String, NamedExpression> 
getColumnToOutput(
                 }
             }
         }
+        for (Column ttlColumn : rowTtlColumns) {
+            Preconditions.checkState(table instanceof OlapTable);
+            OlapTable olapTable = (OlapTable) table;
+            String rowTtlCol = olapTable.getRowTtlCol();
+            if (rowTtlCol == null) {
+                if (isPartialUpdate) {
+                    continue;
+                }
+                Alias output = new Alias(new 
NullLiteral(DataType.fromCatalogType(ttlColumn.getType())),
+                        ttlColumn.getName());
+                columnToOutput.put(ttlColumn.getName(), output);
+                columnToReplaced.put(ttlColumn.getName(), output.toSlot());
+                replaceMap.put(output.toSlot(), output.child());
+                continue;
+            }
+            NamedExpression source = columnToOutput.get(rowTtlCol);
+            if (source == null) {
+                // Existing rows keep the stored source time. SegmentWriter 
fills new keys from
+                // the source column default.
+                Preconditions.checkState(isPartialUpdate);

Review Comment:
   抛出有意义的异常



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

Reply via email to