github-actions[bot] commented on code in PR #64413:
URL: https://github.com/apache/doris/pull/64413#discussion_r3457583919


##########
fe/fe-core/src/test/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslatorTest.java:
##########
@@ -98,13 +102,23 @@ protected void runBeforeAll() throws Exception {
     @Test
     public void testOlapPrune() throws Exception {
         LogicalProperties placeHolder = Mockito.mock(LogicalProperties.class);
-        OlapTable t1 = PlanConstructor.newOlapTable(0, "t1", 0, 
KeysType.AGG_KEYS);
+        List<Column> columns = ImmutableList.of(
+                new Column("id", Type.INT, true, AggregateType.NONE, "0", ""),
+                new Column("name", Type.STRING, true, AggregateType.NONE, "", 
""),
+                new Column("value", Type.INT, false, AggregateType.SUM, "0", 
""));
+        OlapTable t1 = new OlapTable(0, "t1", columns, KeysType.AGG_KEYS, new 
PartitionInfo(),
+                new HashDistributionInfo(3, ImmutableList.of(columns.get(0))));
+        t1.setIndexMeta(-1, "t1", t1.getFullSchema(), 0, 0, (short) 0, 
TStorageType.COLUMN,
+                KeysType.AGG_KEYS);
         List<String> qualifier = new ArrayList<>();
         qualifier.add("test");
         List<Slot> t1Output = new ArrayList<>();
-        SlotReference col1 = new SlotReference("col1", IntegerType.INSTANCE);
-        SlotReference col2 = new SlotReference("col2", IntegerType.INSTANCE);
-        SlotReference col3 = new SlotReference("col2", IntegerType.INSTANCE);
+        SlotReference col1 = 
SlotReference.fromColumn(StatementScopeIdGenerator.newExprId(),

Review Comment:
   This test still keeps the first storage key alive through the filter on 
`col1`, so it does not prove the new path this PR adds. In this shape `col1` is 
a normal required predicate slot; `preserveExtraStorageKeySlots()` is not 
forced to mark a pruned key as an extra key, and nothing asserts that 
`OlapScanNode.extraKeyColumnSlotIds` is serialized and later becomes BE 
`extra_columns`.
   
   Please add a focused case such as keys `(k1, k2)` with a parent project 
requiring only `k2` and no predicate on `k1`, then assert the scan tuple 
preserves `k1`, `getExtraKeyColumnSlotIds()` contains only that slot id, and 
the output projection removes it. Ideally add a BE/regression check with 
`enable_no_need_read_data_opt` on and off so the new FE-to-BE contract and kill 
switch are covered end to end.



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