[fix](explode-map) fix explode_map with alias (#39972)

## Proposed changes
backport: https://github.com/apache/doris/pull/39757
Issue Number: close #xxx

<!--Describe your changes.-->
This commit is contained in:
amory
2024-08-27 18:32:10 +08:00
committed by GitHub
parent fc9936d923
commit d70fe130d7
4 changed files with 55 additions and 1 deletions

View File

@ -271,7 +271,8 @@ public class BindExpression implements AnalysisRuleFactory {
for (int idx = 0; idx < fields.size(); ++idx) {
expandAlias.add(new Alias(new StructElement(
boundSlot, new StringLiteral(fields.get(idx).getName())),
generate.getExpandColumnAlias().get(i).get(idx)));
generate.getExpandColumnAlias().get(i).get(idx),
slot.getQualifier()));
}
}
}

View File

@ -60,6 +60,10 @@ public class Alias extends NamedExpression implements UnaryExpression {
this(exprId, ImmutableList.of(child), name, ImmutableList.of(), false);
}
public Alias(Expression child, String name, List<String> qualifier) {
this(StatementScopeIdGenerator.newExprId(), ImmutableList.of(child), name, qualifier, false);
}
public Alias(ExprId exprId, Expression child, String name, boolean nameFromChild) {
this(exprId, ImmutableList.of(child), name, ImmutableList.of(), nameFromChild);
}