morningman commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1011875780


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -4125,6 +4131,11 @@ private void renameColumn(Database db, OlapTable table, 
String colName,
             }
         }
 
+        // 5. modify sequence map col
+        if (table.hasSequenceCol() && 
table.getSequenceMapCol().equalsIgnoreCase(colName)) {

Review Comment:
   Please add regression test to cover this "rename column" case



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -893,6 +893,21 @@ public void setBloomFilterInfo(Set<String> bfColumns, 
double bfFpp) {
         this.bfFpp = bfFpp;
     }
 
+    public String getSequenceMapCol() {
+        if (tableProperty == null) {
+            return null;
+        }
+        return tableProperty.getSequenceMapCol();
+    }
+
+    // map the sequence column to other column
+    public void setSequenceMapCol(String colName) {
+        if (tableProperty == null) {
+            tableProperty = new TableProperty(new HashMap<>());
+        }
+        tableProperty.setSequenceMapCol(colName);

Review Comment:
   Forget to set `this.hasSequenceCol`?



##########
fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java:
##########
@@ -277,9 +278,13 @@ private void initColumns(ParamCreateContext context) 
throws UserException {
                 
columnDescs.descs.add(ImportColumnDesc.newDeleteSignImportColumnDesc(new 
IntLiteral(1)));
             }
             // add columnExpr for sequence column
-            if (context.fileGroup.hasSequenceCol()) {
+            if (targetTable instanceof OlapTable && ((OlapTable) 
targetTable).hasSequenceCol()) {

Review Comment:
   Please also modify `LoadScanProvider`, line 194



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to