drexler-sky commented on PR #1923:
URL: 
https://github.com/apache/datafusion-comet/pull/1923#issuecomment-3006298989

   @andygrove Thanks for the suggestion! I have tried
   ```
          checkSparkAnswerAndOperator(spark.sql("""
               SELECT array_distinct(
                 CASE WHEN _2 = _3
                     THEN array(_4)
                     ELSE array()
                 END
               )
               FROM t1
             """))
   ```
   However, Spark still appears to replace the second array_distinct with `[]`.
   ```
   == Physical Plan ==
   *(1) Project [CASE WHEN (cast(_2#1 as smallint) = _3#2) THEN 
array_distinct(array(_4#3)) ELSE [] END AS array_distinct(CASE WHEN (_2 = _3) 
THEN array(_4) ELSE array() END)#44]
   +- *(1) CometColumnarToRow
      +- CometScan parquet [_2#1,_3#2,_4#3] Batched: true, DataFilters: [], 
Format: CometParquet, Location: InMemoryFileIndex(1 
paths)[file:/private/var/folders/2r/znvj4hhd3t1cp22pmw4m3h_40000gn/T/spark-39...,
 PartitionFilters: [], PushedFilters: [], ReadSchema: 
struct<_2:tinyint,_3:smallint,_4:int>
   
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to