Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6505#discussion_r31399854
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
 ---
    @@ -482,30 +482,66 @@ trait HiveTypeCoercion {
       }
     
       /**
    -   * Changes Boolean values to Bytes so that expressions like true < false 
can be Evaluated.
    +   * Changes numeric values to booleans so that expressions like true = 1 
can be evaluated.
        */
    -  object BooleanComparisons extends Rule[LogicalPlan] {
    -    val trueValues = Seq(1, 1L, 1.toByte, 1.toShort, new 
java.math.BigDecimal(1)).map(Literal(_))
    -    val falseValues = Seq(0, 0L, 0.toByte, 0.toShort, new 
java.math.BigDecimal(0)).map(Literal(_))
    +  object BooleanEqualization extends Rule[LogicalPlan] {
    +    private val trueValues = Seq(1.toByte, 1.toShort, 1, 1L, new 
java.math.BigDecimal(1))
    --- End diff --
    
    Shouldn't this be a SQL internal Decimal type?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to