carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [24/50] [abbrv] carbondata git commit: Inset Filter
Date Thu, 06 Jul 2017 14:41:49 GMT
Inset Filter


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

Branch: refs/heads/branch-1.1
Commit: 5b66732ccf0f54e09f61a3c6e07c26c69ae03e28
Parents: 42ad4ab
Author: sounakr <sounakr@gmail.com>
Authored: Fri May 26 16:59:44 2017 +0530
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Thu Jun 15 13:26:19 2017 +0530

----------------------------------------------------------------------
 .../apache/spark/sql/execution/CarbonLateDecodeStrategy.scala    | 4 ++++
 .../scala/org/apache/spark/sql/optimizer/CarbonFilters.scala     | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/5b66732c/integration/spark2/src/main/scala/org/apache/spark/sql/execution/CarbonLateDecodeStrategy.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/CarbonLateDecodeStrategy.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/CarbonLateDecodeStrategy.scala
index ac43a12..4605914 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/CarbonLateDecodeStrategy.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/CarbonLateDecodeStrategy.scala
@@ -471,6 +471,10 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         Some(CastExpr(c))
       case c@In(Cast(a: Attribute, _), list) if !list.exists(!_.isInstanceOf[Literal]) =>
         Some(CastExpr(c))
+      case InSet(a: Attribute, set) =>
+        Some(sources.In(a.name, set.toArray))
+      case Not(InSet(a: Attribute, set)) =>
+        Some(sources.Not(sources.In(a.name, set.toArray)))
       case GreaterThan(a: Attribute, Literal(v, t)) =>
         Some(sources.GreaterThan(a.name, v))
       case GreaterThan(Literal(v, t), a: Attribute) =>

http://git-wip-us.apache.org/repos/asf/carbondata/blob/5b66732c/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
index f8abd67..89823fe 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
@@ -197,6 +197,10 @@ object CarbonFilters {
           Some(CastExpr(c))
         case c@In(Cast(a: Attribute, _), list) if !list.exists(!_.isInstanceOf[Literal])
=>
             Some(CastExpr(c))
+        case InSet(a: Attribute, set) =>
+          Some(sources.In(a.name, set.toArray))
+        case Not(InSet(a: Attribute, set)) =>
+          Some(sources.Not(sources.In(a.name, set.toArray)))
         case GreaterThan(a: Attribute, Literal(v, t)) =>
           Some(sources.GreaterThan(a.name, v))
         case GreaterThan(Literal(v, t), a: Attribute) =>


Mime
View raw message