[SQL] Fix TupleIsNull miss in SelectStmt resultExpr (#4279)
This commit is contained in:
@ -195,7 +195,7 @@ public class Planner {
|
||||
exprs, rootFragment.getPlanRoot().getOutputSmap(), analyzer, true);
|
||||
rootFragment.setOutputExprs(resExprs);
|
||||
} else {
|
||||
List<Expr> resExprs = Expr.substituteList(queryStmt.getBaseTblResultExprs(),
|
||||
List<Expr> resExprs = Expr.substituteList(queryStmt.getResultExprs(),
|
||||
rootFragment.getPlanRoot().getOutputSmap(), analyzer, false);
|
||||
rootFragment.setOutputExprs(resExprs);
|
||||
}
|
||||
|
||||
@ -1036,6 +1036,8 @@ public class SingleNodePlanner {
|
||||
}
|
||||
unionNode.setTblRefIds(Lists.newArrayList(inlineViewRef.getId()));
|
||||
unionNode.addConstExprList(selectStmt.getBaseTblResultExprs());
|
||||
//set outputSmap to substitute literal in outputExpr
|
||||
unionNode.setOutputSmap(inlineViewRef.getSmap());
|
||||
unionNode.init(analyzer);
|
||||
return unionNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user