You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/01/19 09:44:39 UTC
[jira] [Commented] (SPARK-12904) Strength reduction for
integer/decimal comparisons
[ https://issues.apache.org/jira/browse/SPARK-12904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15106436#comment-15106436 ]
Reynold Xin commented on SPARK-12904:
-------------------------------------
[~viirya] maybe you can add this when you have a chance. Thanks!
> Strength reduction for integer/decimal comparisons
> --------------------------------------------------
>
> Key: SPARK-12904
> URL: https://issues.apache.org/jira/browse/SPARK-12904
> Project: Spark
> Issue Type: Bug
> Components: Optimizer, SQL
> Reporter: Reynold Xin
>
> We can do the following strength reduction for comparisons between an integral column and a decimal literal:
> 1. int_col > decimal_literal => int_col > floor(decimal_literal)
> 2. int_col >= decimal_literal => int_col > ceil(decimal_literal)
> 3. int_col < decimal_literal => int_col < floor(decimal_literal)
> 4. int_col <= decimal_literal => int_col < ceil(decimal_literal)
> This is more useful as soon as we start parsing floating point numeric literals as decimals rather than doubles (SPARK-12848).
--
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