You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/08/18 18:24:24 UTC
[08/12] git commit: DRILL-1278: Fix selecting scalar field from a map
with join clause.
DRILL-1278: Fix selecting scalar field from a map with join clause.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/81bd7527
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/81bd7527
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/81bd7527
Branch: refs/heads/master
Commit: 81bd7527846318610a3367e4bd756d269fedfb9c
Parents: d4a07db
Author: Mehant Baid <me...@gmail.com>
Authored: Mon Aug 11 18:04:30 2014 -0700
Committer: Aditya Kishore <ad...@maprtech.com>
Committed: Mon Aug 18 14:56:52 2014 +0530
----------------------------------------------------------------------
.../drill/exec/physical/impl/project/ProjectRecordBatch.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/81bd7527/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java
index 1ba0103..fcc216f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java
@@ -309,6 +309,7 @@ public class ProjectRecordBatch extends AbstractSingleRecordBatch<Project>{
String outputName = getRef(namedExpression).getRootSegment().getPath();
if (result != null && result.outputNames != null && result.outputNames.size() > 0) {
+ // TODO: Revisit this logic. It is possible that the output names array does not contain the expression of interest in index 0
if (result.outputNames.get(0) == EMPTY_STRING) continue;
outputName = result.outputNames.get(0);
}
@@ -406,11 +407,10 @@ public class ProjectRecordBatch extends AbstractSingleRecordBatch<Project>{
if (!(ex.getExpr() instanceof SchemaPath)) continue;
NameSegment expr = ((SchemaPath) ex.getExpr()).getRootSegment();
NameSegment ref = ex.getRef().getRootSegment();
- boolean exprHasPrefix = expr.getPath().contains(StarColumnHelper.PREFIX_DELIMITER);
boolean refHasPrefix = ref.getPath().contains(StarColumnHelper.PREFIX_DELIMITER);
boolean exprContainsStar = expr.getPath().contains(StarColumnHelper.STAR_COLUMN);
- if (exprHasPrefix || refHasPrefix || exprContainsStar) {
+ if (refHasPrefix || exprContainsStar) {
needed = true;
break;
}