[ https://issues.apache.org/jira/browse/SPARK-16323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17113522#comment-17113522 ]
Apache Spark commented on SPARK-16323: -------------------------------------- User 'sandeep-katta' has created a pull request for this issue: https://github.com/apache/spark/pull/28600 > Avoid unnecessary cast when doing integral divide > ------------------------------------------------- > > Key: SPARK-16323 > URL: https://issues.apache.org/jira/browse/SPARK-16323 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.0.0 > Reporter: Sean Zhong > Assignee: Marco Gaido > Priority: Minor > Fix For: 3.0.0 > > > This is a follow up of issue SPARK-15776 > *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 {{cast(xx as > double)}} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org