Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private void updateReplaceMapWithOutput(Plan oldPlan, Plan newPlan, Map<ExprId,
private Plan updateOperativeSlots(LogicalCatalogRelation oldRelation, LogicalCatalogRelation newRelation) {
List<Slot> oldOperativeSlots = oldRelation.getOperativeSlots();
List<Slot> newOperativeSlots = new ArrayList<>(oldOperativeSlots.size());
int outputSize = oldOperativeSlots.size();
int outputSize = oldRelation.getOutput().size();
for (Slot opSlot : oldOperativeSlots) {
int idx;
for (idx = 0; idx < outputSize; idx++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ public void testDeepCopyOlapScan() {
}
}

@Test
public void testDeepCopyOlapScanWithNonFirstOperativeSlot() {
LogicalOlapScan relationPlan = PlanConstructor.newLogicalOlapScan(0, "a", 0);
relationPlan = (LogicalOlapScan) relationPlan.withOperativeSlots(
ImmutableList.of(relationPlan.getOutput().get(1)));
LogicalOlapScan aCopy =
(LogicalOlapScan) relationPlan.accept(LogicalPlanDeepCopier.INSTANCE, new DeepCopierContext());

Assertions.assertEquals(ImmutableList.of(aCopy.getOutput().get(1)), aCopy.getOperativeSlots());
}

@Test
public void testDeepCopyAggregateWithSourceRepeat() {
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t", 0);
Expand Down
Loading