| ==== |
| ---- QUERY |
| CREATE TABLE id_part (i int, s string) |
| PARTITIONED BY SPEC (i) |
| STORED BY ICEBERG |
| TBLPROPERTIES ('format-version'='2'); |
| ==== |
| ---- QUERY |
| # Delete from empty table is no-op. |
| DELETE FROM id_part where i = 1; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| SHOW FILES IN id_part; |
| ---- RESULTS |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| INSERT INTO id_part VALUES(1, 'one'), (2, 'two'), (3, 'three'); |
| DELETE FROM id_part WHERE i = 2; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| 1,'one' |
| 3,'three' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| INSERT INTO id_part VALUES(4, 'four'), (5, 'five'), (6, 'six'); |
| DELETE FROM id_part WHERE i % 2 = 0; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| 1,'one' |
| 3,'three' |
| 5,'five' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| SHOW FILES IN id_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=1/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=2/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=2/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=3/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=4/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=4/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=5/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=6/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=6/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| DELETE FROM id_part WHERE strleft(s, 1) = 'o'; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| 5,'five' |
| 3,'three' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| DELETE FROM id_part WHERE i > 0; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| INSERT INTO id_part VALUES (null, 'null'); |
| SELECT * FROM id_part; |
| ---- RESULTS |
| NULL,'null' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| DELETE FROM id_part where s = 'null'; |
| SELECT * FROM id_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| SHOW FILES IN id_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=1/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=1/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=2/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=2/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=3/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=3/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=4/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=4/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=5/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=5/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=6/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=6/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=__HIVE_DEFAULT_PARTITION__/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/id_part/data/i=__HIVE_DEFAULT_PARTITION__/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| CREATE TABLE trunc_part (i int, s string) |
| PARTITIONED BY SPEC (truncate(1, s)) |
| STORED BY ICEBERG |
| TBLPROPERTIES ('format-version'='2'); |
| ==== |
| ---- QUERY |
| # Delete from empty table is no-op. |
| DELETE FROM trunc_part where i = 1; |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| INSERT INTO trunc_part VALUES(1, 'one'), (2, 'two'), (3, 'three'); |
| DELETE FROM trunc_part WHERE s like 't%'; |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| 1,'one' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| INSERT INTO trunc_part VALUES(4, 'four'), (5, 'five'), (6, 'six'); |
| DELETE FROM trunc_part WHERE i % 2 = 0; |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| 1,'one' |
| 5,'five' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| DELETE FROM trunc_part WHERE i > 0; |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| INSERT INTO trunc_part VALUES (0, null); |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| 0,'NULL' |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| DELETE FROM trunc_part where s is null; |
| SELECT * FROM trunc_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING |
| ==== |
| ---- QUERY |
| SHOW FILES IN trunc_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=f/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=o/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=o/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=s/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=s/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=t/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=t/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=t/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=__HIVE_DEFAULT_PARTITION__/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/trunc_part/data/s_trunc=__HIVE_DEFAULT_PARTITION__/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| CREATE TABLE multi_part (i int, s string, f double) |
| PARTITIONED BY SPEC (bucket(3, i), truncate(1, s)) |
| STORED BY ICEBERG |
| TBLPROPERTIES ('format-version'='2'); |
| ==== |
| ---- QUERY |
| # Delete from empty table is no-op. |
| DELETE FROM multi_part where i = 1; |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| INSERT INTO multi_part VALUES(1, 'one', 1.1), (2, 'two', 2.2), (3, 'three', 3.33); |
| DELETE FROM multi_part |
| WHERE i != (select min(i) from multi_part) and |
| i != (select max(i) from multi_part); |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| INSERT INTO multi_part VALUES(4, 'four', 4.4), (5, 'five', 5.5), (6, 'six', 6.6); |
| DELETE FROM multi_part WHERE i % 2 = 0; |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 5,'five',5.5 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| DELETE FROM multi_part WHERE i > 0; |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| INSERT INTO multi_part VALUES (null, 'null',0.0); |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| NULL,'null',0.0 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| DELETE FROM multi_part where s = 'null'; |
| SELECT * FROM multi_part; |
| ---- RESULTS |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| SHOW FILES IN multi_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=0/s_trunc=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=0/s_trunc=f/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=0/s_trunc=t/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=0/s_trunc=t/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=0/s_trunc=t/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=f/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=o/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=o/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=s/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=2/s_trunc=s/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=__HIVE_DEFAULT_PARTITION__/s_trunc=n/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/multi_part/data/i_bucket=__HIVE_DEFAULT_PARTITION__/s_trunc=n/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| CREATE TABLE evolve_part (i int, s string, f double) |
| STORED BY ICEBERG |
| TBLPROPERTIES ('format-version'='2'); |
| ==== |
| ---- QUERY |
| INSERT INTO evolve_part VALUES(1, 'one', 1.1), (2, 'two', 2.2), (3, 'three', 3.33); |
| DELETE FROM evolve_part WHERE i = 2; |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| ALTER TABLE evolve_part SET PARTITION SPEC (i); |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| INSERT INTO evolve_part VALUES (10, 'ten', 10.10), (20, 'twenty', 20.20); |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| 20,'twenty',20.20 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| DELETE FROM evolve_part WHERE i = 20; |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| ALTER TABLE evolve_part SET PARTITION SPEC (truncate(1, s)); |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| INSERT INTO evolve_part VALUES (30, 'thirty', 30.30), (40, 'forty', 40.40), (50, 'fifty', 50.50); |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| 30,'thirty',30.30 |
| 40,'forty',40.40 |
| 50,'fifty',50.50 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| DELETE FROM evolve_part WHERE i = 50; |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| 30,'thirty',30.30 |
| 40,'forty',40.40 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| ALTER TABLE evolve_part SET PARTITION SPEC (void(s)); |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 1,'one',1.1 |
| 3,'three',3.33 |
| 10,'ten',10.10 |
| 30,'thirty',30.30 |
| 40,'forty',40.40 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| DELETE FROM evolve_part WHERE length(s) < 4; |
| SELECT * FROM evolve_part; |
| ---- RESULTS |
| 3,'three',3.33 |
| 30,'thirty',30.3 |
| 40,'forty',40.4 |
| ---- TYPES |
| INT,STRING,DOUBLE |
| ==== |
| ---- QUERY |
| SHOW FILES IN evolve_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/i=10/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/i=10/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/i=20/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/i=20/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/s_trunc_1=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/s_trunc_1=f/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/s_trunc_1=f/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/evolve_part/data/s_trunc_1=t/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| CREATE TABLE ice_store_sales PARTITIONED BY SPEC (ss_sold_date_sk) |
| STORED BY ICEBERG |
| TBLPROPERTIES ('format-version'='2') |
| AS SELECT * FROM tpcds_parquet.store_sales; |
| SELECT count(*) FROM ice_store_sales; |
| ---- RESULTS |
| 2880404 |
| ---- TYPES |
| BIGINT |
| ==== |
| ---- QUERY |
| SELECT count(*) FROM ice_store_sales where ss_customer_sk % 10 = 0; |
| ---- RESULTS |
| 278906 |
| ---- TYPES |
| BIGINT |
| ==== |
| ---- QUERY |
| DELETE FROM ice_store_sales where ss_customer_sk % 10 = 0; |
| SELECT count(*) FROM ice_store_sales; |
| ---- RESULTS |
| 2601498 |
| ---- TYPES |
| BIGINT |
| ==== |
| ---- QUERY |
| SELECT * FROM ice_store_sales where ss_customer_sk % 10 = 0; |
| ---- RESULTS |
| ---- TYPES |
| INT, BIGINT, INT, INT, INT, INT, INT, INT, BIGINT, INT, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, INT |
| ==== |
| ---- QUERY |
| create table date_year_part (i int, d date) |
| partitioned by spec (year(d)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into date_year_part values (1, '1968-01-01 01:02:03'), |
| (2, '1969-12-31 23:59:00'), (3, '1970-01-01 00:00:00'), |
| (4, '2023-11-15 15:31:00'); |
| show files in date_year_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1969/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1970/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=2023/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1968/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1969/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1970/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=2023/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from date_year_part where i > 0; |
| show files in date_year_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1969/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1970/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=2023/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1968/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1969/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=1970/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_year_part/data/d_year=2023/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from date_year_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, DATE |
| ==== |
| ---- QUERY |
| create table date_month_part (i int, d date) |
| partitioned by spec (month(d)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into date_month_part values (1, '1968-01-01'), |
| (2, '1969-12-31'), (3, '1970-01-01'), (4, '2023-11-15'); |
| show files in date_month_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1968-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1970-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=2023-11/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1968-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1969-12/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1970-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=2023-11/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from date_month_part where i > 0; |
| show files in date_month_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1968-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1970-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=2023-11/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1968-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1969-12/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=1970-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_month_part/data/d_month=2023-11/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from date_month_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, DATE |
| ==== |
| ---- QUERY |
| create table date_day_part (i int, d date) |
| partitioned by spec (day(d)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into date_day_part values (1, '1968-01-01'), |
| (2, '1969-12-31'), (3, '1970-01-01'), (4, '2023-11-15'); |
| show files in date_day_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1968-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1969-12-31/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=2023-11-15/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1968-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1969-12-31/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1970-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=2023-11-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from date_day_part where i > 0; |
| show files in date_day_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1968-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1969-12-31/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=2023-11-15/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1968-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1969-12-31/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=1970-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/date_day_part/data/d_day=2023-11-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from date_day_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, DATE |
| ==== |
| ---- QUERY |
| create table ts_year_part (i int, ts timestamp) |
| partitioned by spec (year(ts)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into ts_year_part values (1, '1968-01-01'), |
| (2, '1969-12-31'), (3, '1970-01-01'), (4, '2023-11-15'); |
| show files in ts_year_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1969/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1970/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=2023/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1968/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1969/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1970/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=2023/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from ts_year_part where i > 0; |
| show files in ts_year_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1969/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1970/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=2023/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1968/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1969/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=1970/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_year_part/data/ts_year=2023/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from ts_year_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, TIMESTAMP |
| ==== |
| ---- QUERY |
| create table ts_month_part (i int, ts timestamp) |
| partitioned by spec (month(ts)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into ts_month_part values (1, '1968-01-01 01:02:03'), |
| (2, '1969-12-31 23:59:00'), (3, '1970-01-01 00:00:00'), |
| (4, '2023-11-15 15:31:00'); |
| show files in ts_month_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1968-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1970-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=2023-11/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1968-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1969-12/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1970-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=2023-11/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from ts_month_part where i > 0; |
| show files in ts_month_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1968-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1970-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=2023-11/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1968-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1969-12/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=1970-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_month_part/data/ts_month=2023-11/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from ts_month_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, TIMESTAMP |
| ==== |
| ---- QUERY |
| create table ts_day_part (i int, ts timestamp) |
| partitioned by spec (day(ts)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into ts_day_part values (1, '1968-01-01 01:02:03'), |
| (2, '1969-12-31 23:59:00'), (3, '1970-01-01 00:00:00'), |
| (4, '2023-11-15 15:31:00'); |
| show files in ts_day_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1968-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1969-12-31/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=2023-11-15/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1968-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1969-12-31/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1970-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=2023-11-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from ts_day_part where i > 0; |
| show files in ts_day_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1968-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1969-12-31/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=2023-11-15/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1968-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1969-12-31/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=1970-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_day_part/data/ts_day=2023-11-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from ts_day_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, TIMESTAMP |
| ==== |
| ---- QUERY |
| create table ts_hour_part (i int, ts timestamp) |
| partitioned by spec (hour(ts)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into ts_hour_part values (1, '1968-01-01 01:02:03'), |
| (2, '1969-12-31 23:59:00'), (3, '1970-01-01 00:00:00'), |
| (4, '2023-11-15 15:31:00'); |
| show files in ts_hour_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1968-01-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1969-12-31-23/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1970-01-01-00/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=2023-11-15-15/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1968-01-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1969-12-31-23/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1970-01-01-00/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=2023-11-15-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from ts_hour_part where i > 0; |
| show files in ts_hour_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1968-01-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1969-12-31-23/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1970-01-01-00/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=2023-11-15-15/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1968-01-01-01/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1969-12-31-23/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=1970-01-01-00/delete-.*parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_hour_part/data/ts_hour=2023-11-15-15/delete-.*parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from ts_hour_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, TIMESTAMP |
| ==== |
| ---- QUERY |
| create table ts_evolve_part (i int, ts timestamp) |
| partitioned by spec (year(ts)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into ts_evolve_part values (1, '1968-01-01 01:02:03'); |
| alter table ts_evolve_part set partition spec (month(ts)); |
| insert into ts_evolve_part values (2, '1969-12-31 23:59:00'); |
| insert into ts_evolve_part values (111, 'invalid'); |
| alter table ts_evolve_part set partition spec (day(ts)); |
| insert into ts_evolve_part values (3, '1970-01-01 00:00:00'); |
| alter table ts_evolve_part set partition spec (hour(ts)); |
| insert into ts_evolve_part values (4, '2023-11-15 15:31:00'); |
| show files in ts_evolve_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=__HIVE_DEFAULT_PARTITION__/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_hour=2023-11-15-15/(?!delete-).*.parq','.*B','','.*' |
| ---- RESULTS: VERIFY_IS_NOT_IN |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_year=1968/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=1969-12/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=__HIVE_DEFAULT_PARTITION__/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_day=1970-01-01/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_hour=2023-11-15-15/delete-.*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from ts_evolve_part where i > 0; |
| show files in ts_evolve_part; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_year=1968/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=1969-12/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=__HIVE_DEFAULT_PARTITION__/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_day=1970-01-01/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_hour=2023-11-15-15/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_year=1968/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=1969-12/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_month=__HIVE_DEFAULT_PARTITION__/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_day=1970-01-01/delete-.*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/ts_evolve_part/data/ts_hour=2023-11-15-15/delete-.*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| select * from ts_evolve_part; |
| ---- RESULTS |
| ---- TYPES |
| INT, TIMESTAMP |
| ==== |
| ---- QUERY |
| create table numeric_truncate (id int, int_col int, bigint_col bigint, dec_8_0 decimal(8, 0), dec_10_2 decimal(10, 2)) |
| partitioned by spec (truncate(10, int_col), truncate(1000, bigint_col), void(id), truncate(20, dec_8_0), truncate(50, dec_10_2)) |
| stored by iceberg |
| tblproperties ('format-version'='2'); |
| insert into numeric_truncate values (1, 12, 1222, 135, 20.75); |
| show files in numeric_truncate; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/numeric_truncate/data/int_col_trunc=10/bigint_col_trunc=1000/dec_8_0_trunc=120/dec_10_2_trunc=20.50/(?!delete-).*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| delete from numeric_truncate where id = 1; |
| ---- DML_RESULTS: numeric_truncate |
| ---- TYPES |
| INT,INT,BIGINT,DECIMAL,DECIMAL |
| ==== |
| ---- QUERY |
| show files in numeric_truncate; |
| ---- RESULTS: VERIFY_IS_SUBSET |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/numeric_truncate/data/int_col_trunc=10/bigint_col_trunc=1000/dec_8_0_trunc=120/dec_10_2_trunc=20.50/(?!delete-).*.parq','.*B','','.*' |
| row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/numeric_truncate/data/int_col_trunc=10/bigint_col_trunc=1000/dec_8_0_trunc=120/dec_10_2_trunc=20.50/delete-.*.parq','.*B','','.*' |
| ---- TYPES |
| STRING, STRING, STRING, STRING |
| ==== |
| ---- QUERY |
| create table ice_alltypes_part_v2 (i INT NULL, p_bool BOOLEAN NULL, p_int INT NULL, p_bigint BIGINT NULL, |
| p_float FLOAT NULL, p_double DOUBLE NULL, p_decimal DECIMAL(6,3) NULL, p_date DATE NULL, p_string STRING NULL) |
| PARTITIONED BY SPEC (p_bool, p_int, p_bigint, p_float, p_double, p_decimal, p_date, p_string) |
| STORED AS ICEBERG |
| TBLPROPERTIES ('format-version'='2'); |
| insert into ice_alltypes_part_v2 select * from functional_parquet.iceberg_alltypes_part; |
| ---- DML_RESULTS: ice_alltypes_part_v2 |
| 1,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala' |
| 2,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala' |
| ---- TYPES |
| INT, BOOLEAN, INT, BIGINT, FLOAT, DOUBLE, DECIMAL, DATE, STRING |
| ==== |
| ---- QUERY |
| delete from ice_alltypes_part_v2 where i=1; |
| ---- DML_RESULTS: ice_alltypes_part_v2 |
| 2,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala' |
| ---- TYPES |
| INT, BOOLEAN, INT, BIGINT, FLOAT, DOUBLE, DECIMAL, DATE, STRING |
| ==== |
| ---- QUERY |
| # Create table to test IMPALA-13768. It will have multiple partitions, with |
| # multiple data files in each partition, where min/max ranges of column 'bi' |
| # is disjunct for data files (in same partition). |
| create table ice_invalid_deletes (bi bigint, year int) |
| partitioned by spec (year) |
| stored as iceberg tblproperties ('format-version'='2'); |
| insert into ice_invalid_deletes |
| select bigint_col, year from functional.alltypes where month = 10; |
| with v as (select max(bi) as max_bi from ice_invalid_deletes) |
| insert into ice_invalid_deletes select bi + v.max_bi, year from v, ice_invalid_deletes; |
| delete from ice_invalid_deletes where bi % 11 = 0; |
| ==== |
| ---- QUERY |
| # Scan single data file (single channel in EXCHANGE sender) with delete file |
| # that have references to other data files. |
| select count(*) from ice_invalid_deletes where year=2010 and bi = 180; |
| ---- RESULTS |
| 31 |
| ---- TYPES |
| BIGINT |
| ==== |
| ---- QUERY |
| # Scan single data file per partition with delete files that reference other data files. |
| select count(*) from ice_invalid_deletes where year>2000 and bi = 180; |
| ---- RESULTS |
| 62 |
| ---- TYPES |
| BIGINT |
| ==== |