carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [36/50] [abbrv] incubator-carbondata git commit: [BUG] Timestamp column filter is not working for unknown filter (#779)
Date Thu, 30 Jun 2016 17:42:23 GMT
[BUG] Timestamp column filter is not working for unknown filter (#779)



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

Branch: refs/heads/master
Commit: 697ba7b7e38ff0aa8966ef2bfbac15b5435e9835
Parents: 114b471
Author: nareshpr <prnaresh.naresh@gmail.com>
Authored: Thu Jun 30 00:10:19 2016 +0530
Committer: Venkata Ramana G <g.ramana.v@gmail.com>
Committed: Thu Jun 30 00:10:19 2016 +0530

----------------------------------------------------------------------
 .../filters/FilterExpressionProcessor.java      | 21 ++++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/697ba7b7/core/src/main/java/org/carbondata/query/filters/FilterExpressionProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/filters/FilterExpressionProcessor.java
b/core/src/main/java/org/carbondata/query/filters/FilterExpressionProcessor.java
index dded529..8a85599 100644
--- a/core/src/main/java/org/carbondata/query/filters/FilterExpressionProcessor.java
+++ b/core/src/main/java/org/carbondata/query/filters/FilterExpressionProcessor.java
@@ -302,7 +302,8 @@ public class FilterExpressionProcessor implements FilterProcessor {
             && currentCondExpression.getColumnList().get(0).getCarbonColumn().getDataType()
             != DataType.STRUCT) {
           if (!currentCondExpression.getColumnList().get(0).getCarbonColumn()
-              .hasEncoding(Encoding.DICTIONARY)) {
+              .hasEncoding(Encoding.DICTIONARY) || currentCondExpression.getColumnList().get(0)
+              .getCarbonColumn().hasEncoding(Encoding.DIRECT_DICTIONARY)) {
             if (FilterUtil.checkIfExpressionContainsColumn(currentCondExpression.getLeft())
                 && FilterUtil.checkIfExpressionContainsColumn(currentCondExpression.getRight())
|| (
                 FilterUtil.checkIfExpressionContainsUnknownExp(currentCondExpression.getRight())
@@ -333,18 +334,12 @@ public class FilterExpressionProcessor implements FilterProcessor {
             && condExpression.getColumnList().get(0).getCarbonColumn().getDataType()
             != DataType.STRUCT) {
           condExpression = (ConditionalExpression) expression;
-          if (condExpression.isSingleDimension()) {
-            if (!condExpression.getColumnList().get(0).getCarbonColumn()
-                .hasEncoding(Encoding.DICTIONARY)) {
-              if (FilterUtil.checkIfExpressionContainsColumn(expression)) {
-                return new RowLevelFilterResolverImpl(expression, isExpressionResolve, false,
-                    tableIdentifier);
-              } else if (expressionTree.getFilterExpressionType() == ExpressionType.UNKNOWN)
{
-                return new RowLevelFilterResolverImpl(expression, false, false, tableIdentifier);
-              }
-
-              return new ConditionalFilterResolverImpl(expression, true, true);
-            }
+          if (condExpression.getColumnList().get(0).getCarbonColumn()
+              .hasEncoding(Encoding.DICTIONARY) && !condExpression.getColumnList().get(0)
+              .getCarbonColumn().hasEncoding(Encoding.DIRECT_DICTIONARY)) {
+            return new ConditionalFilterResolverImpl(expression, true, true);
+          } else {
+            return new RowLevelFilterResolverImpl(expression, false, false, tableIdentifier);
           }
         } else {
           return new RowLevelFilterResolverImpl(expression, false, false, tableIdentifier);


Mime
View raw message