[jira] [Commented] (SPARK-40222) Numeric try_add/try_divide/try_subtract/try_multiply should throw error from their children
[ https://issues.apache.org/jira/browse/SPARK-40222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17585047#comment-17585047 ] Apache Spark commented on SPARK-40222: -- User 'gengliangwang' has created a pull request for this issue: https://github.com/apache/spark/pull/37663 > Numeric try_add/try_divide/try_subtract/try_multiply should throw error from > their children > --- > > Key: SPARK-40222 > URL: https://issues.apache.org/jira/browse/SPARK-40222 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 3.4.0 >Reporter: Gengliang Wang >Assignee: Gengliang Wang >Priority: Major > > Similar to https://issues.apache.org/jira/browse/SPARK-40054, we should > refactor the > {{{}try_add{}}}/{{{}try_subtract{}}}/{{{}try_multiply{}}}/{{{}try_divide{}}} > functions so that the errors from their children will be shown instead of > ignored. > Spark SQL allows arithmetic operations between > Number/Date/Timestamp/CalendarInterval/AnsiInterval (see the rule > [ResolveBinaryArithmetic|https://github.com/databricks/runtime/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L501] > for details). Some of these combinations can throw exceptions too: * Date + > CalendarInterval > * Date + AnsiInterval > * Timestamp + AnsiInterval > * Date - CalendarInterval > * Date - AnsiInterval > * Timestamp - AnsiInterval > * Number * CalendarInterval > * Number * AnsiInterval > * CalendarInterval / Number > * AnsiInterval / Number > This Jira is for the cases when both input data types are numbers. > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-40222) Numeric try_add/try_divide/try_subtract/try_multiply should throw error from their children
[ https://issues.apache.org/jira/browse/SPARK-40222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17585048#comment-17585048 ] Apache Spark commented on SPARK-40222: -- User 'gengliangwang' has created a pull request for this issue: https://github.com/apache/spark/pull/37663 > Numeric try_add/try_divide/try_subtract/try_multiply should throw error from > their children > --- > > Key: SPARK-40222 > URL: https://issues.apache.org/jira/browse/SPARK-40222 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 3.4.0 >Reporter: Gengliang Wang >Assignee: Gengliang Wang >Priority: Major > > Similar to https://issues.apache.org/jira/browse/SPARK-40054, we should > refactor the > {{{}try_add{}}}/{{{}try_subtract{}}}/{{{}try_multiply{}}}/{{{}try_divide{}}} > functions so that the errors from their children will be shown instead of > ignored. > Spark SQL allows arithmetic operations between > Number/Date/Timestamp/CalendarInterval/AnsiInterval (see the rule > [ResolveBinaryArithmetic|https://github.com/databricks/runtime/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L501] > for details). Some of these combinations can throw exceptions too: * Date + > CalendarInterval > * Date + AnsiInterval > * Timestamp + AnsiInterval > * Date - CalendarInterval > * Date - AnsiInterval > * Timestamp - AnsiInterval > * Number * CalendarInterval > * Number * AnsiInterval > * CalendarInterval / Number > * AnsiInterval / Number > This Jira is for the cases when both input data types are numbers. > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org