| # This tests pages skipped by parquet late materialization. |
| ==== |
| ---- QUERY |
| # Test for late materialization on page indexes |
| select * from tpch_parquet.lineitem where l_orderkey=3209632; |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumPagesSkippedByLateMaterialization)> 0 |
| ==== |
| ---- QUERY |
| # Test for late materialization on non-page index |
| select * from tpch_parquet.lineitem |
| where l_comment like '%unusual courts. blithely final theodolit%'; |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumPagesSkippedByLateMaterialization)> 0 |
| ==== |
| ---- QUERY |
| # Test late materialization on runtime filters. |
| SET RUNTIME_FILTER_MODE=GLOBAL; |
| SET RUNTIME_FILTER_WAIT_TIME_MS=5000; |
| select * from tpch_parquet.lineitem l |
| join tpch_parquet.orders o on l.l_orderkey = o.o_orderkey |
| where o_orderdate='1992-06-22' and o_totalprice = 153827.26; |
| ---- RUNTIME_PROFILE |
| row_regex: .*1 of 1 Runtime Filter Published.* |
| aggregation(SUM, NumPagesSkippedByLateMaterialization)> 0 |
| ==== |
| ---- QUERY |
| # Test late materialization on min/max runtime filters. |
| SET RUNTIME_FILTER_WAIT_TIME_MS=5000; |
| SET MINMAX_FILTERING_LEVEL=ROW; |
| SET ENABLED_RUNTIME_FILTER_TYPES=MIN_MAX; |
| SET MINMAX_FILTER_THRESHOLD=0.5; |
| select * from tpch_parquet.lineitem l |
| join tpch_parquet.orders o on l.l_orderkey = o.o_orderkey |
| where o_orderdate='1996-12-01' and o_totalprice >= 250000; |
| ---- RUNTIME_PROFILE |
| row_regex:.* RF00.\[min_max\] -. .\.l_orderkey.* |
| aggregation(SUM, NumPagesSkippedByLateMaterialization)> 0 |
| ==== |
| ---- QUERY |
| # Test late materialization for query with one zipping unnest. |
| select unnest(arr1) |
| from functional_parquet.complextypes_arrays |
| where id = 2; |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumTopLevelValuesSkipped): 10 |
| ==== |
| ---- QUERY |
| # Test late materialization for query with multiple zipping unnests. |
| select unnest(arr1), unnest(arr2) |
| from functional_parquet.complextypes_arrays |
| where id = 2; |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumTopLevelValuesSkipped): 20 |
| ==== |
| ---- QUERY |
| # Test if late materialization for collections works with page filtering. |
| # In table tpch_nested_parquet.customer, min(c_phone) is '10-100-106-1617'. |
| select count(o_orderkey) > 0 |
| from tpch_nested_parquet.customer c left outer join c.c_orders |
| where c_phone < '10-100-106-16170' |
| ---- RESULTS |
| true |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumDictFilteredRowGroups): 0 |
| aggregation(SUM, NumPagesSkippedByLateMaterialization)> 0 |
| aggregation(SUM, NumTopLevelValuesSkipped)> 0 |
| ==== |
| ---- QUERY |
| # Test if PARQUET_LATE_MATERIALIZATION_THRESHOLD is always 1 if there is any |
| # collection that can be skipped. |
| set parquet_read_page_index = false; |
| set expand_complex_types = true; |
| select int_array_array |
| from functional_parquet.complextypestbl where id % 2 = 0; |
| ---- RUNTIME_PROFILE |
| aggregation(SUM, NumTopLevelValuesSkipped): 4 |
| ==== |