diff options
author | Josh Rosen <joshrosen@databricks.com> | 2015-08-10 13:05:03 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-08-10 13:05:03 -0700 |
commit | 0fe66744f16854fc8cd8a72174de93a788e3cf6c (patch) | |
tree | 1e0f77bb4254a59fe9fbab7ef04e0c2498d57411 | |
parent | d285212756168200383bf4df2c951bd80a492a7c (diff) | |
download | spark-0fe66744f16854fc8cd8a72174de93a788e3cf6c.tar.gz spark-0fe66744f16854fc8cd8a72174de93a788e3cf6c.tar.bz2 spark-0fe66744f16854fc8cd8a72174de93a788e3cf6c.zip |
[SPARK-9784] [SQL] Exchange.isUnsafe should check whether codegen and unsafe are enabled
Exchange.isUnsafe should check whether codegen and unsafe are enabled.
Author: Josh Rosen <joshrosen@databricks.com>
Closes #8073 from JoshRosen/SPARK-9784 and squashes the following commits:
7a1019f [Josh Rosen] [SPARK-9784] Exchange.isUnsafe should check whether codegen and unsafe are enabled
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala index b89e634761..029f2264a6 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala @@ -46,7 +46,7 @@ case class Exchange(newPartitioning: Partitioning, child: SparkPlan) extends Una * Returns true iff we can support the data type, and we are not doing range partitioning. */ private lazy val tungstenMode: Boolean = { - GenerateUnsafeProjection.canSupport(child.schema) && + unsafeEnabled && codegenEnabled && GenerateUnsafeProjection.canSupport(child.schema) && !newPartitioning.isInstanceOf[RangePartitioning] } |