Repository: spark
Updated Branches:
  refs/heads/branch-1.5 39493b235 -> d251d9ff0


[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 <joshro...@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

(cherry picked from commit 0fe66744f16854fc8cd8a72174de93a788e3cf6c)
Signed-off-by: Josh Rosen <joshro...@databricks.com>


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

Branch: refs/heads/branch-1.5
Commit: d251d9ff000363665aa6faeb2199a48dc5970ca2
Parents: 39493b2
Author: Josh Rosen <joshro...@databricks.com>
Authored: Mon Aug 10 13:05:03 2015 -0700
Committer: Josh Rosen <joshro...@databricks.com>
Committed: Mon Aug 10 13:05:24 2015 -0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/sql/execution/Exchange.scala   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d251d9ff/sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala
----------------------------------------------------------------------
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 b89e634..029f226 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]
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to