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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java:
##########
@@ -68,7 +92,7 @@ public String toString() {
         return "ScanOlapTable ("
                 + qualifiedName()
                 + ", output: "
-                + 
getOutput().stream().map(Objects::toString).collect(Collectors.joining(", ", 
"[",  "]"))
+                + 
getOutput().stream().map(Objects::toString).collect(Collectors.joining(", ", 
"[", "]"))

Review Comment:
   need to print new attributes for debug easily



##########
fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java:
##########
@@ -193,7 +195,12 @@ public void testPhysicalOlapScan(
             @Mocked DistributionSpecHash distributionSpecHash) {
         List<String> qualifier = Lists.newArrayList();
 
-        PhysicalOlapScan olapScan = new PhysicalOlapScan(olapTable, qualifier, 
distributionSpecHash, Optional.empty(),
+        ArrayList<Long> selectedTabletId = Lists.newArrayList();
+        for (Partition partition : olapTable.getAllPartitions()) {
+            
selectedTabletId.addAll(partition.getBaseIndex().getTabletIdsInOrder());
+        }
+        PhysicalOlapScan olapScan = new PhysicalOlapScan(olapTable, qualifier, 
olapTable.getBaseIndexId(),
+                selectedTabletId, olapTable.getPartitionIds(), 
distributionSpecHash, Optional.empty(),
                 logicalProperties);
 
         Assertions.assertEquals(olapScan, olapScan);

Review Comment:
   compare same object is not a good idea, it is better to new two different 
object and then compare them



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