You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Zhong (JIRA)" <ji...@apache.org> on 2016/06/30 07:41:10 UTC
[jira] [Created] (SPARK-16322) Avoids unnecessary cast when doing
integral divide
Sean Zhong created SPARK-16322:
----------------------------------
Summary: Avoids unnecessary cast when doing integral divide
Key: SPARK-16322
URL: https://issues.apache.org/jira/browse/SPARK-16322
Project: Spark
Issue Type: Improvement
Components: SQL
Reporter: Sean Zhong
Priority: Minor
This is a follow up of https://databricks.atlassian.net/browse/SC-3588
*Problem:*
For Integer divide operator {{div}}:
{code}
scala> spark.sql("select 6 div 3").explain(true)
...
== Analyzed Logical Plan ==
CAST((6 / 3) AS BIGINT): bigint
Project [cast((cast(6 as double) / cast(3 as double)) as bigint) AS CAST((6 / 3) AS BIGINT)#5L]
+- OneRowRelation$
...
{code}
For performance reason, we should not do unnecessary {{cast(xx as double)}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org