IMPALA-14557: Fix flaky test_show_files_partition

TestIcebergTable.test_show_files_partition is unstable because files are
alphanumerically sorted and the order between a random UUID and
"delete-*" is not guaranteed.

This patch fix the flakiness by specifying VERIFY_IS_SUBSET and using
negative lookahead of "delete" word to detect valid Iceberg data file.

Testing:
- Loop and pass test_show_files_partition 50 times. Before, it can fail
  in less than 10 loops.

Change-Id: I6243585a5b7ab7cf7c95d5a9530ce2f2825c550e
Reviewed-on: http://gerrit.cloudera.org:8080/23680
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
This commit is contained in:
Riza Suminto
2025-11-17 09:00:58 -08:00
committed by Michael Smith
parent 166b39547e
commit f2243b76b5

View File

@@ -426,9 +426,9 @@ STRING, STRING, STRING, STRING
---- QUERY
# Show files for partition with both data and delete files
SHOW FILES IN iceberg_showfiles_with_deletes PARTITION (identity_int = 1);
---- RESULTS
---- RESULTS: VERIFY_IS_SUBSET
row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/iceberg_showfiles_with_deletes/data/identity_int=1/delete-.*_data.*.parq','.*','','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/iceberg_showfiles_with_deletes/data/identity_int=1/[^d].*_data.*.parq','.*','','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/iceberg_showfiles_with_deletes/data/identity_int=1/(?!delete).*_data.*.parq','.*','','$ERASURECODE_POLICY'
---- TYPES
STRING, STRING, STRING, STRING
====