This is an automated email from the ASF dual-hosted git repository.

Gabriel39 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 5fae02f85b3 [fix](regression) Make Iceberg rewrite where init script 
idempotent (#63673)
5fae02f85b3 is described below

commit 5fae02f85b3467fe30de956d88536afe986870bc
Author: Socrates <[email protected]>
AuthorDate: Wed May 27 19:01:13 2026 +0800

    [fix](regression) Make Iceberg rewrite where init script idempotent (#63673)
    
    `test_iceberg_rewrite_data_files_where_conditions` depends on three
    Iceberg tables created by the Spark bootstrap script `run21.sql`. The
    script used `CREATE TABLE IF NOT EXISTS` and then always inserted the
    test rows. If the table already exists or the bootstrap SQL is
    re-entered after partial execution, the insert statements append data to
    the existing table, so the regression case may fail before running
    `rewrite_data_files` because `COUNT(*)` is no longer the expected 30
    rows.
    
    This PR makes the init SQL for this case idempotent by dropping and
    recreating the three test tables before inserting the fixed test data.
---
 .../scripts/create_preinstalled_scripts/iceberg/run21.sql        | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run21.sql
 
b/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run21.sql
index e7873d468ad..4af60fed6ba 100644
--- 
a/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run21.sql
+++ 
b/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run21.sql
@@ -8,7 +8,8 @@ use demo.test_db;
 -- 
=====================================================================================
 
 -- Table 1: For baseline test (rewrite without WHERE condition)
-CREATE TABLE IF NOT EXISTS test_rewrite_where_conditions_baseline (
+DROP TABLE IF EXISTS test_rewrite_where_conditions_baseline;
+CREATE TABLE test_rewrite_where_conditions_baseline (
     id BIGINT,
     name STRING,
     age INT,
@@ -56,7 +57,8 @@ INSERT INTO test_rewrite_where_conditions_baseline VALUES
 (30, 'Dana', 49, 99000.0);
 
 -- Table 2: For test with WHERE condition matching subset (id >= 11 AND id <= 
20)
-CREATE TABLE IF NOT EXISTS test_rewrite_where_conditions_with_where (
+DROP TABLE IF EXISTS test_rewrite_where_conditions_with_where;
+CREATE TABLE test_rewrite_where_conditions_with_where (
     id BIGINT,
     name STRING,
     age INT,
@@ -104,7 +106,8 @@ INSERT INTO test_rewrite_where_conditions_with_where VALUES
 (30, 'Dana', 49, 99000.0);
 
 -- Table 3: For test with WHERE condition matching no data (id = 99999)
-CREATE TABLE IF NOT EXISTS test_rewrite_where_conditions_no_match (
+DROP TABLE IF EXISTS test_rewrite_where_conditions_no_match;
+CREATE TABLE test_rewrite_where_conditions_no_match (
     id BIGINT,
     name STRING,
     age INT,


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

Reply via email to