Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/71#discussion_r15207047
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java ---
@@ -260,7 +262,8 @@ private void setRawTargets(PlanContext context,
Target[] targets, String[] refer
Target [] rawTargets = new Target[projection.getNamedExprs().length];
for (int i = 0; i < projection.getNamedExprs().length; i++) {
NamedExpr namedExpr = projection.getNamedExprs()[i];
- EvalNode evalNode = exprAnnotator.createEvalNode(plan, block,
namedExpr.getExpr());
+ EvalNode evalNode = exprAnnotator.createEvalNode(plan, block,
namedExpr.getExpr(),
--- End diff --
name references in select list can be only actual column names. They are
addressed in the manner at
https://github.com/apache/tajo/pull/71/files#diff-c11c2244fea624cb7b08f6906d554cd4R470.
In contrast, setRawTargets() in visitProjection should deal with actual
fields as well as temporal fields generated by common subexpression
elimination. So, it should use RELS_AND_SUBEXPRS.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---