You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ja...@apache.org on 2017/07/12 15:05:17 UTC

[41/50] [abbrv] carbondata git commit: [CARBONDATA-1282] Choose BatchedDatasource scan only if schema fits codegen

[CARBONDATA-1282] Choose BatchedDatasource scan only if schema fits codegen

This closes #1148


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

Branch: refs/heads/datamap
Commit: 619f1f95429c71ec556b18104d3aff536ad2df89
Parents: c6bc1f0
Author: ashok.blend <as...@gmail.com>
Authored: Sat Jul 8 16:27:41 2017 +0530
Committer: Venkata Ramana G <ra...@huawei.com>
Committed: Mon Jul 10 19:28:14 2017 +0530

----------------------------------------------------------------------
 .../apache/spark/sql/execution/CarbonLateDecodeStrategy.scala    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/619f1f95/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 4605914..a206bef 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
@@ -524,7 +524,9 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
           CarbonCommonConstants.ENABLE_VECTOR_READER_DEFAULT)
       }
     }
-    sqlContext.conf.wholeStageEnabled && vectorizedReader.toBoolean &&
+    val supportCodegen =
+      sqlContext.conf.wholeStageEnabled && sqlContext.conf.wholeStageMaxNumFields >= cols.size
+    supportCodegen && vectorizedReader.toBoolean &&
       cols.forall(_.dataType.isInstanceOf[AtomicType])
   }
 }