TsukiokaKogane commented on code in PR #64776:
URL: https://github.com/apache/doris/pull/64776#discussion_r3504748346


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/NormalizeOlapTableStreamScan.java:
##########
@@ -201,21 +278,120 @@ private Plan normalize(LogicalOlapTableStreamScan scan) {
                     project.add(new Alias(slot.getExprId(), seqSlot, 
Column.STREAM_SEQ_COL));
                 }
             }
-            incrementalPlan = new LogicalProject<>(project, plan);
+        } else {
+            // only filter delete & update before rows for building before 
snapshot image
+            Preconditions.checkArgument(opSlot != null);
+            Expression opFilter = new InPredicate(opSlot, ImmutableList.of(
+                    new BigIntLiteral(BinlogUtils.ROW_BINLOG_DELETE),
+                    new BigIntLiteral(BinlogUtils.ROW_BINLOG_UPDATE_BEFORE)));
+            plan = new LogicalFilter<>(ImmutableSet.of(opFilter), plan);
+        }
+        return new LogicalProject<>(project, plan);
+    }
+
+    private Plan makeResetOlapFullScan(LogicalOlapTableStreamScan scan, 
CascadesContext cascadesContext) {
+        // make olap scan on base table
+        OlapTableStreamWrapper streamWrapper = (OlapTableStreamWrapper) 
scan.getTable();
+        OlapTable baseTable = streamWrapper.getBaseTable();
+        Plan plan = makeOlapScanOnBaseTable(scan, cascadesContext, baseTable, 
scan.getSelectedPartitionIds());
+        List<Slot> originSlots = scan.getLogicalProperties().getOutput();
+        return projectToOriginSlots(plan, originSlots);
+    }
+
+    private Plan makeSnapshotScan(LogicalOlapTableStreamScan scan, 
CascadesContext cascadesContext) {
+        List<Long> selectedPartitionIds = scan.getSelectedPartitionIds();
+        OlapTableStreamWrapper streamWrapper = (OlapTableStreamWrapper) 
scan.getTable();

Review Comment:
   ok



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