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

    https://github.com/apache/spark/pull/14364#discussion_r72379517
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
 ---
    @@ -408,8 +409,21 @@ object FunctionRegistry {
         expression[BitwiseAnd]("&"),
         expression[BitwiseNot]("~"),
         expression[BitwiseOr]("|"),
    -    expression[BitwiseXor]("^")
    -
    +    expression[BitwiseXor]("^"),
    +
    +    // Cast aliases (SPARK-16730)
    +    castAlias("boolean", BooleanType),
    +    castAlias("tinyint", ByteType),
    +    castAlias("smallint", ShortType),
    +    castAlias("int", IntegerType),
    +    castAlias("bigint", LongType),
    +    castAlias("float", FloatType),
    +    castAlias("double", DoubleType),
    +    castAlias("decimal", DecimalType.USER_DEFAULT),
    --- End diff --
    
    This is not what Hive's default does, but what Spark SQL's cast default.
    
    I think it is a bug, but I'm not sure if it is intentional. I suggest we 
change this in a separate pull request, since there is more than one place to 
check.



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to