Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Dec 23, 2024
1 parent 9e1eb53 commit 61d54ab
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,16 @@ public class InsertIntoValuesAnalyzer extends AbstractBatchJobExecutor {
new InlineTableToUnionOrOneRowRelation(),
new BindSink(),
new MergeProjects(),

// the BatchInsertIntoTableCommand need send StringLiteral to backend,
// and only support alias(literal as xx) or alias(cast(literal as xx)),
// but not support alias(cast(slotRef as xx)) which create in BindSink,
// we should push down the cast into Union or OneRowRelation.
// the InsertIntoTableCommand support translate slotRef in the TPlan,
// so we don't need this rules, just evaluate in backend
new PushProjectIntoUnion(),
new PushProjectIntoOneRowRelation(),

new RewriteBatchInsertIntoExpressions(ExpressionRewrite.bottomUp(
ConvertAggStateCast.INSTANCE,
FoldConstantRuleOnFE.PATTERN_MATCH_INSTANCE
Expand Down

0 comments on commit 61d54ab

Please sign in to comment.