This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit bd4a817893d261d756144363d246b5ebeeb40639 Author: Riza Suminto <[email protected]> AuthorDate: Fri May 5 15:28:56 2023 -0700 IMPALA-11123: Restore NumFileMetadataRead counter NumFileMetadataRead counter was lost with the revert of commit f932d78ad0a30e322d59fc39072f710f889d2135. This patch restore NumFileMetadataRead counter and also assertions in impacted iceberg test files. Other impacted test files will be gradually restored with reimplementation of optimized count star for ORC. Testing: - Pass core tests. Change-Id: Ib14576245d978a127f688e265cab2f4ff519600c Reviewed-on: http://gerrit.cloudera.org:8080/19854 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- be/src/exec/hdfs-columnar-scanner.cc | 4 ++++ be/src/exec/hdfs-columnar-scanner.h | 5 +++++ be/src/exec/orc/hdfs-orc-scanner.cc | 1 + be/src/exec/parquet/hdfs-parquet-scanner.cc | 2 ++ .../iceberg-compound-predicate-push-down.test | 2 ++ .../QueryTest/iceberg-in-predicate-push-down.test | 4 ++++ .../QueryTest/iceberg-is-null-predicate-push-down.test | 1 + .../queries/QueryTest/iceberg-partitioned-insert.test | 7 +++++++ .../iceberg-plain-count-star-optimization.test | 18 +++++++++++++++++- .../QueryTest/iceberg-upper-lower-bound-metrics.test | 3 +++ .../iceberg-v2-plain-count-star-optimization.test | 6 +++++- .../iceberg-v2-read-position-deletes-orc.test | 8 ++++++++ .../QueryTest/iceberg-v2-read-position-deletes.test | 12 ++++++++++++ tests/query_test/test_iceberg.py | 1 + 14 files changed, 72 insertions(+), 2 deletions(-) diff --git a/be/src/exec/hdfs-columnar-scanner.cc b/be/src/exec/hdfs-columnar-scanner.cc index 913142936..fd741eecd 100644 --- a/be/src/exec/hdfs-columnar-scanner.cc +++ b/be/src/exec/hdfs-columnar-scanner.cc @@ -64,6 +64,9 @@ PROFILE_DEFINE_COUNTER(IoReadTotalBytes, DEBUG, TUnit::BYTES, "The total number of bytes read from streams."); PROFILE_DEFINE_COUNTER(IoReadSkippedBytes, DEBUG, TUnit::BYTES, "The total number of bytes skipped from streams."); +PROFILE_DEFINE_COUNTER(NumFileMetadataRead, DEBUG, TUnit::UNIT, + "The total number of file metadata reads done in place of rows or row groups / " + "stripe iteration."); const char* HdfsColumnarScanner::LLVM_CLASS_NAME = "class.impala::HdfsColumnarScanner"; @@ -95,6 +98,7 @@ Status HdfsColumnarScanner::Open(ScannerContext* context) { io_total_request_ = PROFILE_IoReadTotalRequest.Instantiate(profile); io_total_bytes_ = PROFILE_IoReadTotalBytes.Instantiate(profile); io_skipped_bytes_ = PROFILE_IoReadSkippedBytes.Instantiate(profile); + num_file_metadata_read_ = PROFILE_NumFileMetadataRead.Instantiate(profile); return Status::OK(); } diff --git a/be/src/exec/hdfs-columnar-scanner.h b/be/src/exec/hdfs-columnar-scanner.h index 472863bf2..a1d0b2903 100644 --- a/be/src/exec/hdfs-columnar-scanner.h +++ b/be/src/exec/hdfs-columnar-scanner.h @@ -142,6 +142,11 @@ class HdfsColumnarScanner : public HdfsScanner { /// Total number of bytes skipped during stream reading. RuntimeProfile::Counter* io_skipped_bytes_; + /// Total file metadata reads done. + /// Incremented when serving query from metadata instead of iterating rows or + /// row groups / stripes. + RuntimeProfile::Counter* num_file_metadata_read_; + private: int ProcessScratchBatchCodegenOrInterpret(RowBatch* dst_batch); }; diff --git a/be/src/exec/orc/hdfs-orc-scanner.cc b/be/src/exec/orc/hdfs-orc-scanner.cc index 595f2d60a..ddf25ea8c 100644 --- a/be/src/exec/orc/hdfs-orc-scanner.cc +++ b/be/src/exec/orc/hdfs-orc-scanner.cc @@ -789,6 +789,7 @@ Status HdfsOrcScanner::GetNextInternal(RowBatch* row_batch) { eos_ = true; return Status::OK(); } + COUNTER_ADD(num_file_metadata_read_, 1); assemble_rows_timer_.Start(); DCHECK_LT(stripe_rows_read_, file_rows); int64_t rows_remaining = file_rows - stripe_rows_read_; diff --git a/be/src/exec/parquet/hdfs-parquet-scanner.cc b/be/src/exec/parquet/hdfs-parquet-scanner.cc index d540a3f11..6fe0fd264 100644 --- a/be/src/exec/parquet/hdfs-parquet-scanner.cc +++ b/be/src/exec/parquet/hdfs-parquet-scanner.cc @@ -449,6 +449,7 @@ Status HdfsParquetScanner::GetNextInternal(RowBatch* row_batch) { DCHECK_LE(row_group_idx_, file_metadata_.row_groups.size()); DCHECK_LE(row_group_rows_read_, file_metadata_.num_rows); if (row_group_idx_ == file_metadata_.row_groups.size()) break; + COUNTER_ADD(num_file_metadata_read_, 1); Tuple* dst_tuple = reinterpret_cast<Tuple*>(tuple_buf); TupleRow* dst_row = row_batch->GetRow(row_batch->AddRow()); InitTuple(template_tuple_, dst_tuple); @@ -470,6 +471,7 @@ Status HdfsParquetScanner::GetNextInternal(RowBatch* row_batch) { eos_ = true; return Status::OK(); } + COUNTER_ADD(num_file_metadata_read_, 1); assemble_rows_timer_.Start(); DCHECK_LE(row_group_rows_read_, file_metadata_.num_rows); int64_t rows_remaining = file_metadata_.num_rows - row_group_rows_read_; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-compound-predicate-push-down.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-compound-predicate-push-down.test index c7feddf64..e5ef490f8 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-compound-predicate-push-down.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-compound-predicate-push-down.test @@ -39,6 +39,7 @@ select count(1) from ice_compound_pred_pd; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_compound_pred_pd; @@ -423,6 +424,7 @@ select count(1) from ice_compound_pred_pd1; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_compound_pred_pd1; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-in-predicate-push-down.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-in-predicate-push-down.test index 9aadc2711..866bc582f 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-in-predicate-push-down.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-in-predicate-push-down.test @@ -33,6 +33,7 @@ select count(1) from ice_pred_pd1; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_pred_pd1; @@ -73,6 +74,7 @@ where 9 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 3 +aggregation(SUM, NumFileMetadataRead): 3 ==== ---- QUERY # The IN predicate matches two row groups @@ -457,6 +459,7 @@ where 3 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 1 +aggregation(SUM, NumFileMetadataRead): 1 ==== ---- QUERY # NOT_IN does not work because col_dt is not the partition column @@ -547,6 +550,7 @@ select count(1) from ice_pred_pd2; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_pred_pd2; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-is-null-predicate-push-down.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-is-null-predicate-push-down.test index e6207e791..6b7ba819d 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-is-null-predicate-push-down.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-is-null-predicate-push-down.test @@ -35,6 +35,7 @@ select count(1) from ice_is_null_pred_pd; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_is_null_pred_pd; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-partitioned-insert.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-partitioned-insert.test index 9ce8545cb..b1806a66e 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-partitioned-insert.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-partitioned-insert.test @@ -170,6 +170,7 @@ select count(*) from ice_bigints; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY # When filtered only by partition column Iceberg can do the filtering and no need to read data in Impala. @@ -181,6 +182,7 @@ where i = 0 and j = 0; ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 1 aggregation(SUM, RowsRead): 0 +aggregation(SUM, NumFileMetadataRead): 1 ==== ---- QUERY # When not just partition columns are involved in the filtering then Impala has to read data to answer the query. @@ -289,6 +291,7 @@ where bool_col = true; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 4 ==== ---- QUERY # IMPALA-11123: Behavior changes after a revert: NumRowGroups changed from 0 to 4. @@ -300,6 +303,7 @@ where float_col = 0; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 4 ==== ---- QUERY # IMPALA-11123: Behavior changes after a revert: NumRowGroups changed from 0 to 4. @@ -311,6 +315,7 @@ where double_col = 0; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 4 ==== ---- QUERY # IMPALA-11123: Behavior changes after a revert: NumRowGroups changed from 0 to 2. @@ -322,6 +327,7 @@ where date_col = '2009-01-01'; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 2 ==== ---- QUERY # IMPALA-11123: Behavior changes after a revert: NumRowGroups changed from 0 to 4. @@ -333,6 +339,7 @@ where string_col = '0'; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 4 ==== ---- QUERY # 'timestamp_col' is not a partitioning column, so min/max stats will not be used to diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-plain-count-star-optimization.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-plain-count-star-optimization.test index 9310878c5..f43346d36 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-plain-count-star-optimization.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-plain-count-star-optimization.test @@ -13,6 +13,7 @@ select count(*) from ice_tbl; 0 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY insert into @@ -33,6 +34,7 @@ select count(*) from ice_tbl; 3 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY create table ice_tbl_u1 stored as iceberg as select * from ice_tbl; @@ -45,6 +47,7 @@ select count(*) from ice_tbl_u1; 3 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY insert into @@ -66,6 +69,7 @@ select count(*) from ice_tbl; 6 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY create table ice_tbl_u2 stored as iceberg as select * from ice_tbl; @@ -78,6 +82,7 @@ select count(*) from ice_tbl_u2; 6 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY insert into @@ -100,6 +105,7 @@ select count(*) from ice_tbl; 8 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY select count(*) from ice_tbl for system_time as of now(); @@ -107,6 +113,7 @@ select count(*) from ice_tbl for system_time as of now(); 8 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY set explain_level=3; @@ -149,6 +156,7 @@ where 4 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 2 ==== ---- QUERY select @@ -160,6 +168,7 @@ having ---- RESULTS ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY select @@ -173,6 +182,7 @@ group by 4 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY select @@ -183,6 +193,7 @@ from 6 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY truncate ice_tbl; @@ -195,6 +206,7 @@ select count(*) from ice_tbl; 0 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY create table parq_tbl(col_i INT, col_s STRING) PARTITIONED BY(x INT) STORED AS PARQUET; @@ -211,6 +223,7 @@ select count(*) from parq_tbl; 3 ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 3 +aggregation(SUM, NumFileMetadataRead): 3 ==== ---- QUERY select count(*) as c from ice_tbl_u1 union all (select count(*) c from ice_tbl_u2) order by c; @@ -221,6 +234,7 @@ select count(*) as c from ice_tbl_u1 union all (select count(*) c from ice_tbl_u BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY with u1 as (select count(*) from ice_tbl_u1), u2 as (select count(*) from ice_tbl_u2) select * from u1, u2; @@ -230,6 +244,7 @@ with u1 as (select count(*) from ice_tbl_u1), u2 as (select count(*) from ice_tb BIGINT,BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY with u1 as (select count(*) from ice_tbl_u1), @@ -241,4 +256,5 @@ u2 as (select count(*) from ice_tbl_u1 union all (select count(*) from ice_tbl_u BIGINT,BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 -==== +aggregation(SUM, NumFileMetadataRead): 0 +==== \ No newline at end of file diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-upper-lower-bound-metrics.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-upper-lower-bound-metrics.test index a1728253a..c16399812 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-upper-lower-bound-metrics.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-upper-lower-bound-metrics.test @@ -20,6 +20,7 @@ select count(*) from ice_types1; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_types1; @@ -251,6 +252,7 @@ select count(*) from ice_types2; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_types2; @@ -368,6 +370,7 @@ select count(*) from ice_types3; BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY show files in ice_types3; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-plain-count-star-optimization.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-plain-count-star-optimization.test index 0edf877d4..21ac4a1fe 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-plain-count-star-optimization.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-plain-count-star-optimization.test @@ -20,6 +20,7 @@ BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 aggregation(SUM, NumOrcStripes): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY with u1 as (select count(*) as c from functional_parquet.iceberg_v2_positional_not_all_data_files_have_delete_files), @@ -34,6 +35,7 @@ BIGINT,BIGINT,TINYINT,BIGINT,BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 aggregation(SUM, NumOrcStripes): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY select count(*) as c from iceberg_v2_positional_not_all_data_files_have_delete_files for system_version as of 752781918366351945 @@ -56,6 +58,7 @@ BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 aggregation(SUM, NumOrcStripes): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY with u1 as (select count(*) as c from functional_parquet.iceberg_v2_positional_not_all_data_files_have_delete_files for system_version as of 752781918366351945), @@ -70,4 +73,5 @@ BIGINT,BIGINT,TINYINT,BIGINT,BIGINT ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 aggregation(SUM, NumOrcStripes): 2 -==== +aggregation(SUM, NumFileMetadataRead): 0 +==== \ No newline at end of file diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes-orc.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes-orc.test index 5cc292ee3..a2af39918 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes-orc.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes-orc.test @@ -39,6 +39,7 @@ SELECT count(*) from iceberg_v2_no_deletes_orc bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_positional_delete_all_rows_orc @@ -80,6 +81,7 @@ SELECT count(*) from iceberg_v2_positional_delete_all_rows_orc for system_versio bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_delete_all_rows_orc @@ -89,6 +91,7 @@ SELECT count(*) from iceberg_v2_positional_delete_all_rows_orc bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_positional_not_all_data_files_have_delete_files_orc @@ -142,6 +145,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files_ bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files_orc for system_version as of 5003445199566617082 @@ -151,6 +155,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files_ bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files_orc @@ -160,6 +165,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files_ bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_partitioned_position_deletes_orc @@ -201,6 +207,7 @@ SELECT count(*) from iceberg_v2_partitioned_position_deletes_orc for system_vers bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_partitioned_position_deletes_orc @@ -210,6 +217,7 @@ SELECT count(*) from iceberg_v2_partitioned_position_deletes_orc bigint ---- RUNTIME_PROFILE aggregation(SUM, NumOrcStripes): 6 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_no_deletes_orc where i = 2; diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes.test index 0b9675a5f..e9c7b985f 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-v2-read-position-deletes.test @@ -39,6 +39,7 @@ SELECT count(*) from iceberg_v2_no_deletes bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_delete_positional @@ -80,6 +81,7 @@ SELECT count(*) from iceberg_v2_delete_positional for system_version as of 68169 bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_delete_positional; @@ -89,6 +91,7 @@ SELECT count(*) from iceberg_v2_delete_positional; bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_positional_delete_all_rows @@ -130,6 +133,7 @@ SELECT count(*) from iceberg_v2_positional_delete_all_rows for system_version as bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_delete_all_rows @@ -139,6 +143,7 @@ SELECT count(*) from iceberg_v2_positional_delete_all_rows bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_positional_not_all_data_files_have_delete_files @@ -192,6 +197,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files for system_version as of 752781918366351945 @@ -201,6 +207,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files @@ -210,6 +217,7 @@ SELECT count(*) from iceberg_v2_positional_not_all_data_files_have_delete_files bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 4 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_positional_update_all_rows @@ -260,6 +268,7 @@ SELECT count(*) from iceberg_v2_positional_update_all_rows for system_version as bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_positional_update_all_rows @@ -269,6 +278,7 @@ SELECT count(*) from iceberg_v2_positional_update_all_rows bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 2 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY COMPUTE STATS iceberg_v2_partitioned_position_deletes @@ -310,6 +320,7 @@ SELECT count(*) from iceberg_v2_partitioned_position_deletes for system_version bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 0 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_partitioned_position_deletes @@ -319,6 +330,7 @@ SELECT count(*) from iceberg_v2_partitioned_position_deletes bigint ---- RUNTIME_PROFILE aggregation(SUM, NumRowGroups): 6 +aggregation(SUM, NumFileMetadataRead): 0 ==== ---- QUERY SELECT count(*) from iceberg_v2_no_deletes where i = 2; diff --git a/tests/query_test/test_iceberg.py b/tests/query_test/test_iceberg.py index 4d4db1e37..37ad24e32 100644 --- a/tests/query_test/test_iceberg.py +++ b/tests/query_test/test_iceberg.py @@ -453,6 +453,7 @@ class TestIcebergTable(IcebergTestSuite): assert len(data.data) == 1 assert expected in data.data assert "NumRowGroups" not in data.runtime_profile + assert "NumFileMetadataRead" not in data.runtime_profile def expect_results_t(ts, expected_results, expected_cols): expect_results(
