Skip to content

Commit c92ca25

Browse files
committed
fix(planner): use getNumGroups() instead of getGroupsPosInScope() in planCopyRelFrom
The Accumulate check for COPY rel from query was incorrectly using getGroupsPosInScope().size() == 1 instead of getNumGroups() <= 1. LogicalPartitioner requires exactly one group (getNumGroups() == 1), but the old check only verified one group had projected expressions, missing cases where multiple groups existed with only one in scope.
1 parent 9ebe044 commit c92ca25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/planner/plan/plan_copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ LogicalPlan Planner::planCopyRelFrom(const BoundCopyFromInfo* info) {
9696
auto& querySource = info->source->constCast<BoundQueryScanSource>();
9797
plan = planQuery(*querySource.statement);
9898
auto schema = plan.getSchema();
99-
if (schema->getGroupsPosInScope().size() == 1) {
99+
if (schema->getNumGroups() <= 1) {
100100
break;
101101
}
102102
// Copy operator assumes all input are in the same data chunk. If this is not the case,

0 commit comments

Comments
 (0)