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

    https://github.com/apache/spark/pull/14364#discussion_r72379213
  
    --- 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),
    --- End diff --
    
    I think that's actually worse, because it makes it less clear what the 
function name is by looking at this source file. Also if for some reason we 
change LongType.simpleString in the future, these functions will subtly break.



---
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