[ 
https://issues.apache.org/jira/browse/SPARK-48016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842734#comment-17842734
 ] 

Dongjoon Hyun edited comment on SPARK-48016 at 5/1/24 6:21 PM:
---------------------------------------------------------------

This is reverted from `branch-3.5` because the cherry-pick has a wrong change 
like the following.
- 
https://github.com/apache/spark/commit/fc0ef07f2949c399537c6d9b5fb7b81f546de212
{code}
- logger.parquet_outputcommitter.name = 
org.apache.parquet.hadoop.ParquetOutputCommitter
+ logger.parquet_outputcommitter.name = 
org.sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scalaapache.parquet.hadoop.ParquetOutputCommitter
{code}


was (Author: dongjoon):
This is reverted from `branch-3.5` because the cherry-pick has a wrong change 
like the following.
{code}
- logger.parquet_outputcommitter.name = 
org.apache.parquet.hadoop.ParquetOutputCommitter
+ logger.parquet_outputcommitter.name = 
org.sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scalaapache.parquet.hadoop.ParquetOutputCommitter
{code}

> Fix a bug in try_divide function when with decimals
> ---------------------------------------------------
>
>                 Key: SPARK-48016
>                 URL: https://issues.apache.org/jira/browse/SPARK-48016
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.0.0, 3.5.2
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0, 3.4.4
>
>
> Binary Arithmetic operators should include the evalMode during makeCopy. 
> Otherwise, the following query will throw DIVIDE_BY_ZERO error instead of 
> returning null
>  
> {code:java}
> SELECT try_divide(1, decimal(0)); {code}
> This is caused from the rule DecimalPrecision:
> {code:java}
> case b @ BinaryOperator(left, right) if left.dataType != right.dataType =>
>   (left, right) match {
>  ...
>     case (l: Literal, r) if r.dataType.isInstanceOf[DecimalType] &&
>         l.dataType.isInstanceOf[IntegralType] &&
>         literalPickMinimumPrecision =>
>       b.makeCopy(Array(Cast(l, DataTypeUtils.fromLiteral(l)), r)) {code}
>  



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

Reply via email to