carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [24/47] incubator-carbondata git commit: [CARBONDATA-99][Bug] For complex type filter queries issue, like and not like are failing (#870)
Date Mon, 01 Aug 2016 10:05:22 GMT
[CARBONDATA-99][Bug] For complex type filter queries issue, like and not like are failing (#870)

For complex type filter queries if query contains filter expression rather than BinaryExpression
the system was not able to get the dimensions which are involved

Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/82b74070
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/82b74070
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/82b74070

Branch: refs/heads/master
Commit: 82b74070b090e627c333f1a574111c33e281725e
Parents: f6e9fbc
Author: sujith71955 <sujithchacko.2010@gmail.com>
Authored: Mon Jul 25 23:24:00 2016 +0530
Committer: Venkata Ramana G <g.ramana.v1@gmail.com>
Committed: Mon Jul 25 23:24:00 2016 +0530

----------------------------------------------------------------------
 .../carbondata/query/carbon/executor/util/QueryUtil.java | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/82b74070/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
index b1de455..d36238e 100644
--- a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
+++ b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
@@ -70,7 +70,6 @@ import org.carbondata.query.complex.querytypes.PrimitiveQueryType;
 import org.carbondata.query.complex.querytypes.StructQueryType;
 import org.carbondata.query.expression.ColumnExpression;
 import org.carbondata.query.expression.Expression;
-import org.carbondata.query.expression.logical.BinaryLogicalExpression;
 import org.carbondata.query.filter.resolver.FilterResolverIntf;
 import org.carbondata.query.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
 
@@ -1105,12 +1104,7 @@ public class QueryUtil {
     }
     List<ColumnExpression> dimensionResolvedInfos = new ArrayList<ColumnExpression>();
     Expression filterExpression = filterResolverTree.getFilterExpression();
-    if (filterExpression instanceof BinaryLogicalExpression) {
-      BinaryLogicalExpression logicalExpression = (BinaryLogicalExpression) filterExpression;
-      dimensionResolvedInfos.addAll(logicalExpression.getColumnList());
-    } else {
-      addColumnDimensions(filterExpression, filterDimensions);
-    }
+    addColumnDimensions(filterExpression, filterDimensions);
     for (ColumnExpression info : dimensionResolvedInfos) {
       if (info.isDimension() && info.getDimension().getNumberOfChild() > 0) {
         filterDimensions.add(info.getDimension());
@@ -1130,7 +1124,8 @@ public class QueryUtil {
    */
   private static void addColumnDimensions(Expression expression,
       Set<CarbonDimension> filterDimensions) {
-    if (null != expression && expression instanceof ColumnExpression) {
+    if (null != expression && expression instanceof ColumnExpression
+        && ((ColumnExpression) expression).isDimension()) {
       filterDimensions.add(((ColumnExpression) expression).getDimension());
       return;
     }


Mime
View raw message