carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject carbondata git commit: [CARBONDATA-1898]Fixed Like, Contains, Ends with query optimization With OR condition
Date Sat, 16 Dec 2017 16:03:52 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 8348752a5 -> 9a2b33ebd


[CARBONDATA-1898]Fixed Like, Contains, Ends with query optimization With OR condition

This closes #1667


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

Branch: refs/heads/master
Commit: 9a2b33ebd7acc7f8c934e73dcd5359d7c4e55f24
Parents: 8348752
Author: kumarvishal <kumarvishal.1802@gmail.com>
Authored: Fri Dec 15 16:35:25 2017 +0530
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Sat Dec 16 21:33:30 2017 +0530

----------------------------------------------------------------------
 .../apache/spark/sql/CarbonBoundReference.scala   |  9 ---------
 .../strategy/CarbonLateDecodeStrategy.scala       |  5 -----
 .../spark/sql/optimizer/CarbonFilters.scala       | 18 ------------------
 3 files changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/9a2b33eb/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonBoundReference.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonBoundReference.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonBoundReference.scala
index 6f578ac..21e56b0 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonBoundReference.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonBoundReference.scala
@@ -48,12 +48,3 @@ case class CarbonBoundReference(colExp: ColumnExpression, dataType: DataType,
nu
 
   override def newInstance(): NamedExpression = throw new UnsupportedOperationException
 }
-
-case class CarbonEndsWith(expr: Expression) extends Filter {
-  override def references: Array[String] = null
-}
-
-case class CarbonContainsWith(expr: Expression) extends Filter {
-  override def references: Array[String] = null
-}
-

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9a2b33eb/integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
index 79bbfb0..8b247f7 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
@@ -471,7 +471,6 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
     (unrecognizedPredicates ++ unhandledPredicates, translatedFilters)
   }
 
-
   /**
    * Tries to translate a Catalyst [[Expression]] into data source [[Filter]].
    *
@@ -568,10 +567,6 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         CastExpressionOptimization.checkIfCastCanBeRemove(c)
       case StartsWith(a: Attribute, Literal(v, t)) =>
         Some(sources.StringStartsWith(a.name, v.toString))
-      case c@EndsWith(a: Attribute, Literal(v, t)) =>
-        Some(CarbonEndsWith(c))
-      case c@Contains(a: Attribute, Literal(v, t)) =>
-        Some(CarbonContainsWith(c))
       case others => None
     }
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9a2b33eb/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 75cc128..7408594 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
@@ -24,8 +24,6 @@ import org.apache.spark.sql.CastExpr
 import org.apache.spark.sql.SparkUnknownExpression
 import org.apache.spark.sql.sources
 import org.apache.spark.sql.types._
-import org.apache.spark.sql.CarbonContainsWith
-import org.apache.spark.sql.CarbonEndsWith
 import org.apache.spark.sql.CarbonExpressions.{MatchCast => Cast}
 
 import org.apache.carbondata.core.metadata.datatype.{DataTypes => CarbonDataTypes}
@@ -108,18 +106,6 @@ object CarbonFilters {
           val r = new LessThanExpression(
             getCarbonExpression(name), getCarbonLiteralExpression(name, maxValueLimit))
           Some(new AndExpression(l, r))
-        case CarbonEndsWith(expr: Expression) =>
-          Some(new SparkUnknownExpression(expr.transform {
-            case AttributeReference(name, dataType, _, _) =>
-              CarbonBoundReference(new CarbonColumnExpression(name.toString,
-                CarbonScalaUtil.convertSparkToCarbonDataType(dataType)), dataType, expr.nullable)
-          }))
-        case CarbonContainsWith(expr: Expression) =>
-          Some(new SparkUnknownExpression(expr.transform {
-            case AttributeReference(name, dataType, _, _) =>
-              CarbonBoundReference(new CarbonColumnExpression(name.toString,
-                CarbonScalaUtil.convertSparkToCarbonDataType(dataType)), dataType, expr.nullable)
-          }))
         case CastExpr(expr: Expression) =>
           Some(transformExpression(expr))
         case _ => None
@@ -250,10 +236,6 @@ object CarbonFilters {
           CastExpressionOptimization.checkIfCastCanBeRemove(c)
         case StartsWith(a: Attribute, Literal(v, t)) =>
           Some(sources.StringStartsWith(a.name, v.toString))
-        case c@EndsWith(a: Attribute, Literal(v, t)) =>
-          Some(CarbonEndsWith(c))
-        case c@Contains(a: Attribute, Literal(v, t)) =>
-          Some(CarbonContainsWith(c))
         case c@Cast(a: Attribute, _) =>
           Some(CastExpr(c))
         case others =>


Mime
View raw message