[fix](Nereids) deep copier generate wrong slot for TVF (#25156)
This commit is contained in:
@ -229,7 +229,7 @@ public class LogicalPlanDeepCopier extends DefaultPlanRewriter<DeepCopierContext
|
||||
}
|
||||
LogicalTVFRelation newTVFRelation = new LogicalTVFRelation(StatementScopeIdGenerator.newRelationId(),
|
||||
tvfRelation.getFunction());
|
||||
updateReplaceMapWithOutput(newTVFRelation, tvfRelation, context.exprIdReplaceMap);
|
||||
updateReplaceMapWithOutput(tvfRelation, newTVFRelation, context.exprIdReplaceMap);
|
||||
context.putRelation(tvfRelation.getRelationId(), newTVFRelation);
|
||||
return newTVFRelation;
|
||||
}
|
||||
|
||||
@ -30,3 +30,8 @@
|
||||
2
|
||||
3
|
||||
|
||||
-- !tvf_in_cte --
|
||||
0
|
||||
1
|
||||
2
|
||||
|
||||
|
||||
@ -48,5 +48,8 @@ suite("test_with") {
|
||||
SELECT * FROM outermost ORDER BY 1;
|
||||
"""
|
||||
|
||||
order_qt_tvf_in_cte """
|
||||
with a as (select number from numbers("number"="3")) select * from a;
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user