You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have known that the rewriteDataFiles is suggested to run periodically.
in our production, we would like to run rewriteDataFiles for a iceberg table once a month using spark sql procedure rewrite_data_files.
for convenience, we add the following sql command in each ETL daily job. call catalog.system.rewrite_data_files(table=>'hive.iceberg_table', where => "load_date > '$LASTMONTH' and load_date <'$CURRENTMONTH' and substr('$TODAY', 7,2) = '03'" )
for instance, when $TODAY = '20230208', then where condition is always false. so we expected that rewrite_data_files can exit directly.
in other words, we got exceptions by executing the sql: call catalog.system.rewrite_data_files(table=>'hive.iceberg_table', where =>" '01'='03' ")
It is an AnalysisException in scala code below since the option object filtered by where condition is empty.
Feature Request / Improvement
Improvement
background
we have known that the rewriteDataFiles is suggested to run periodically.
in our production, we would like to run rewriteDataFiles for a iceberg table once a month using spark sql procedure rewrite_data_files.
for convenience, we add the following sql command in each ETL daily job.
call catalog.system.rewrite_data_files(table=>'hive.iceberg_table', where => "load_date > '$LASTMONTH' and load_date <'$CURRENTMONTH' and substr('$TODAY', 7,2) = '03'" )
for instance, when $TODAY = '20230208', then where condition is always false. so we expected that rewrite_data_files can exit directly.
in other words, we got exceptions by executing the sql:
call catalog.system.rewrite_data_files(table=>'hive.iceberg_table', where =>" '01'='03' ")
It is an AnalysisException in scala code below since the option object filtered by where condition is empty.
iceberg/spark/v3.3/spark/src/main/scala/org/apache/spark/sql/execution/datasources/SparkExpressionConverter.scala
Line 47 in 32a8ef5
Our Request
so could it be possible make rewrite_data_files exit directly without exceptions if the where condtion is a deterministic false?
Query engine
Spark
The text was updated successfully, but these errors were encountered: