Github user petermaxlee commented on the issue:

    https://github.com/apache/spark/pull/14389
  
    I was looking at the code, and I think this is a more general problem with 
decimal widening. The same problem exists for least, and other functions.
    
    ```
    scala> sql("select least(0.1, 0.01)").collect()
    org.apache.spark.sql.AnalysisException: cannot resolve 'least(CAST(0.1 AS 
DECIMAL(1,1)), CAST(0.01 AS DECIMAL(2,2)))' due to data type mismatch: The 
expressions should all have the same type, got LEAST 
(ArrayBuffer(DecimalType(1,1), DecimalType(2,2))).; line 1 pos 7
    ```


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