dramaticlly opened a new issue, #5990:
URL: https://github.com/apache/iceberg/issues/5990

   ### Apache Iceberg version
   
   0.14.1 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Running iceberg spark3.3 benchmark and realized issue with date_add 
expression
   
   executed
   ```shell
   ./gradlew -DsparkVersions=3.3 :iceberg-spark:iceberg-spark-3.3_2.12:jmh \
       -PjmhIncludeRegex=IcebergSourceFlatParquetDataWriteBenchmark \
       
-PjmhOutputPath=benchmark/iceberg-source-flat-parquet-data-write-benchmark-result.txt
   ```
   
   seeing following error
   ```
   # Run progress: 0.00% complete, ETA 00:00:00
   # Fork: 1 of 1
   # Warmup Iteration   1: <failure>
   
   org.apache.spark.sql.AnalysisException: cannot resolve 
'date_add(current_date(), (longCol % CAST(20 AS BIGINT)))' due to data type 
mismatch: argument 2 requires (int or smallint or tinyint) type, however, 
'(longCol % CAST(20 AS BIGINT))' is of bigint type.; line 1 pos 0;
   'Project [longCol#2L, intCol#4, floatCol#7, doubleCol#11, decimalCol#16, 
date_add(current_date(Some(America/Los_Angeles)), (longCol#2L % cast(20 as 
bigint))) AS dateCol#22]
   +- Project [longCol#2L, intCol#4, floatCol#7, doubleCol#11, cast(longCol#2L 
as decimal(20,5)) AS decimalCol#16]
      +- Project [longCol#2L, intCol#4, floatCol#7, cast(longCol#2L as double) 
AS doubleCol#11]
         +- Project [longCol#2L, intCol#4, cast(longCol#2L as float) AS 
floatCol#7]
            +- Project [longCol#2L, cast(longCol#2L as int) AS intCol#4]
               +- Project [id#0L AS longCol#2L]
                  +- Range (0, 5000000, step=1, splits=Some(1))
   ```
   
   
   I believe this is due to `DATE_ADD` expect a smallint or tinyint instead of 
longCol which is of `bigint`


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to