From 2744c4f8c734e3a5fab946e7010bf6ef891593a5 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Fri, 22 Nov 2024 15:24:37 +0100 Subject: [PATCH] Handling review comments --- tsl/src/hypercore/arrow_cache_explain.c | 22 +++---- tsl/test/expected/hypercore_columnar.out | 7 --- tsl/test/expected/hypercore_copy.out | 7 --- tsl/test/expected/hypercore_create.out | 7 --- tsl/test/expected/hypercore_cursor.out | 7 --- tsl/test/expected/hypercore_index_btree.out | 70 ++++++++++++++++----- tsl/test/expected/hypercore_index_hash.out | 16 ++--- tsl/test/expected/hypercore_insert.out | 7 --- tsl/test/expected/hypercore_join.out | 7 --- tsl/test/expected/hypercore_merge.out | 7 --- tsl/test/expected/hypercore_parallel.out | 7 --- tsl/test/expected/hypercore_stats.out | 7 --- tsl/test/expected/hypercore_types.out | 7 --- tsl/test/expected/hypercore_update.out | 7 --- tsl/test/expected/hypercore_vacuum_full.out | 7 --- tsl/test/sql/include/hypercore_helpers.sql | 7 --- 16 files changed, 73 insertions(+), 126 deletions(-) diff --git a/tsl/src/hypercore/arrow_cache_explain.c b/tsl/src/hypercore/arrow_cache_explain.c index b018008b883..a508e61b4df 100644 --- a/tsl/src/hypercore/arrow_cache_explain.c +++ b/tsl/src/hypercore/arrow_cache_explain.c @@ -61,12 +61,12 @@ standard_ExplainOneQuery(Query *query, int cursorOptions, IntoClause *into, Expl } #endif -#define APPEND_IF_POSITIVE(INFO, FMT, VAL) \ - do \ - { \ - if ((VAL) > 0) \ - appendStringInfo((INFO), " " FMT, (long long) (VAL)); \ - } while (0) +static inline void +append_if_positive(StringInfo info, const char *key, long long val) +{ + if (val > 0) + appendStringInfo(info, " %s=%lld", key, val); +} static void explain_decompression(Query *query, int cursorOptions, IntoClause *into, ExplainState *es, @@ -87,13 +87,13 @@ explain_decompression(Query *query, int cursorOptions, IntoClause *into, Explain appendStringInfoString(es->str, "Array:"); if (has_cache_data) appendStringInfoString(es->str, " cache"); - APPEND_IF_POSITIVE(es->str, "hits=%lld", decompress_cache_stats.hits); - APPEND_IF_POSITIVE(es->str, "misses=%lld", decompress_cache_stats.misses); - APPEND_IF_POSITIVE(es->str, "evictions=%lld", decompress_cache_stats.evictions); + append_if_positive(es->str, "hits", decompress_cache_stats.hits); + append_if_positive(es->str, "misses", decompress_cache_stats.misses); + append_if_positive(es->str, "evictions", decompress_cache_stats.evictions); if (has_decompress_data) appendStringInfoString(es->str, ", decompress"); - APPEND_IF_POSITIVE(es->str, "count=%lld", decompress_cache_stats.decompressions); - APPEND_IF_POSITIVE(es->str, "calls=%lld", decompress_cache_stats.decompress_calls); + append_if_positive(es->str, "count", decompress_cache_stats.decompressions); + append_if_positive(es->str, "calls", decompress_cache_stats.decompress_calls); appendStringInfoChar(es->str, '\n'); } else diff --git a/tsl/test/expected/hypercore_columnar.out b/tsl/test/expected/hypercore_columnar.out index 137339fc5ea..0fdcd9782b2 100644 --- a/tsl/test/expected/hypercore_columnar.out +++ b/tsl/test/expected/hypercore_columnar.out @@ -35,10 +35,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -52,9 +48,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_copy.out b/tsl/test/expected/hypercore_copy.out index 4a5dc501e4d..611a0555d16 100644 --- a/tsl/test/expected/hypercore_copy.out +++ b/tsl/test/expected/hypercore_copy.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_create.out b/tsl/test/expected/hypercore_create.out index f6b800406b5..216d5498879 100644 --- a/tsl/test/expected/hypercore_create.out +++ b/tsl/test/expected/hypercore_create.out @@ -35,10 +35,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -52,9 +48,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_cursor.out b/tsl/test/expected/hypercore_cursor.out index c96823556bb..54f5ab82fb1 100644 --- a/tsl/test/expected/hypercore_cursor.out +++ b/tsl/test/expected/hypercore_cursor.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_index_btree.out b/tsl/test/expected/hypercore_index_btree.out index 0b8785fd482..298dd2fd7d2 100644 --- a/tsl/test/expected/hypercore_index_btree.out +++ b/tsl/test/expected/hypercore_index_btree.out @@ -43,10 +43,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -60,9 +56,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; @@ -136,28 +129,35 @@ $$, :'hypertable')); explain_anonymize --------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Sort Sort Key: _hyper_I_N_chunk.location_id -> Append -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -(22 rows) +(29 rows) select location_id, count(*) into orig from :hypertable where location_id in (3,4,5) group by location_id; @@ -197,28 +197,35 @@ $$, :'hypertable')); explain_anonymize --------------------------------------------------------------------------------------------------------- Finalize GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Sort Sort Key: _hyper_I_N_chunk.owner_id -> Append -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.owner_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_owner_idx on _hyper_I_N_chunk Index Cond: (owner_id = ANY ('{3,4,5}'::bigint[])) -(22 rows) +(29 rows) select owner_id, count(*) into owner_comp from :hypertable where owner_id in (3,4,5) group by owner_id; @@ -262,28 +269,35 @@ $$, :'hypertable')); explain_anonymize ------------------------------------------------------------------------------------------------------------------------ Finalize GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Sort Sort Key: _hyper_I_N_chunk.location_id -> Append -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial GroupAggregate + Group Key: _hyper_I_N_chunk.location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_owner_id_idx on _hyper_I_N_chunk Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -(22 rows) +(29 rows) -- result should be the same select location_id, count(*) into comp from :hypertable where location_id in (3,4,5) group by location_id; @@ -395,11 +409,13 @@ $$, :'hypertable')); explain_analyze_anonymize -------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.device_id Sort Method: quicksort -> Append (actual rows=N loops=N) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.device_id Sort Method: quicksort @@ -407,18 +423,23 @@ $$, :'hypertable')); Vectorized Filter: ((device_id >= 10) AND (device_id <= 20)) Rows Removed by Filter: 133 -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 10) AND (device_id <= 20)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 10) AND (device_id <= 20)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 10) AND (device_id <= 20)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 10) AND (device_id <= 20)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.device_id Sort Method: quicksort @@ -426,7 +447,7 @@ $$, :'hypertable')); Vectorized Filter: ((device_id >= 10) AND (device_id <= 20)) Rows Removed by Filter: 234 Array: cache hits=N misses=N, decompress count=N calls=N -(32 rows) +(39 rows) select explain_analyze_anonymize(format($$ select device_id, avg(temp) from %s where device_id between 10 and 20 @@ -435,10 +456,11 @@ $$, :'chunk1')); explain_analyze_anonymize -------------------------------------------------------------------------------------------------------------- GroupAggregate (actual rows=N loops=N) + Group Key: device_id -> Index Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 10) AND (device_id <= 20)) Array: cache hits=N misses=N, decompress count=N calls=N -(4 rows) +(5 rows) -- Test index scan on segmentby column select explain_analyze_anonymize(format($$ @@ -601,36 +623,43 @@ $$, :'hypertable')); explain_analyze_anonymize ---------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.location_id Sort Method: quicksort -> Append (actual rows=N loops=N) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.location_id Sort Method: quicksort -> Custom Scan (ColumnarScan) on _hyper_I_N_chunk (actual rows=N loops=N) Scankey: ((location_id >= 5) AND (location_id <= 10)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Index Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((location_id >= 5) AND (location_id <= 10)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Index Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((location_id >= 5) AND (location_id <= 10)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Index Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((location_id >= 5) AND (location_id <= 10)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Index Scan using _hyper_I_N_chunk_hypertable_location_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((location_id >= 5) AND (location_id <= 10)) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.location_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.location_id Sort Method: quicksort -> Custom Scan (ColumnarScan) on _hyper_I_N_chunk (actual rows=N loops=N) Scankey: ((location_id >= 5) AND (location_id <= 10)) Array: cache misses=N, decompress count=N calls=N -(30 rows) +(37 rows) select explain_analyze_anonymize(format($$ select device_id, avg(humidity) from %s where device_id between 5 and 10 @@ -639,35 +668,42 @@ $$, :'hypertable')); explain_analyze_anonymize ------------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Sort (actual rows=N loops=N) Sort Key: _hyper_I_N_chunk.device_id Sort Method: quicksort -> Append (actual rows=N loops=N) -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -> Partial GroupAggregate (actual rows=N loops=N) + Group Key: _hyper_I_N_chunk.device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -(29 rows) +(36 rows) select explain_analyze_anonymize(format($$ select location_id, avg(humidity) from %s where location_id between 5 and 10 @@ -676,10 +712,11 @@ $$, :'chunk1')); explain_analyze_anonymize -------------------------------------------------------------------------------------------------------------------------------------- GroupAggregate (actual rows=N loops=N) + Group Key: location_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_location_id_include_humidity_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((location_id >= 5) AND (location_id <= 10)) Heap Fetches: N -(4 rows) +(5 rows) select explain_analyze_anonymize(format($$ select device_id, avg(humidity) from %s where device_id between 5 and 10 @@ -688,10 +725,11 @@ $$, :'chunk1')); explain_analyze_anonymize ------------------------------------------------------------------------------------------------------------------- GroupAggregate (actual rows=N loops=N) + Group Key: device_id -> Index Only Scan using _hyper_I_N_chunk_hypertable_device_id_idx on _hyper_I_N_chunk (actual rows=N loops=N) Index Cond: ((device_id >= 5) AND (device_id <= 10)) Heap Fetches: N -(4 rows) +(5 rows) ------------------------------------- -- Test UNIQUE and Partial indexes -- diff --git a/tsl/test/expected/hypercore_index_hash.out b/tsl/test/expected/hypercore_index_hash.out index 3637b4a48ef..88e5558c915 100644 --- a/tsl/test/expected/hypercore_index_hash.out +++ b/tsl/test/expected/hypercore_index_hash.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; @@ -137,38 +130,45 @@ $$, :'hypertable')); explain_anonymize ------------------------------------------------------------------------------------------ Finalize HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Append -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Partial HashAggregate + Group Key: _hyper_I_N_chunk.location_id -> Bitmap Heap Scan on _hyper_I_N_chunk Recheck Cond: (location_id = ANY ('{3,4,5}'::integer[])) -> Bitmap Index Scan on _hyper_I_N_chunk_hypertable_location_id_idx Index Cond: (location_id = ANY ('{3,4,5}'::integer[])) -(32 rows) +(39 rows) select location_id, count(*) into orig from :hypertable where location_id in (3,4,5) group by location_id; diff --git a/tsl/test/expected/hypercore_insert.out b/tsl/test/expected/hypercore_insert.out index c67de503081..ec829da8566 100644 --- a/tsl/test/expected/hypercore_insert.out +++ b/tsl/test/expected/hypercore_insert.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_join.out b/tsl/test/expected/hypercore_join.out index 5d26c1e0b8f..081a19355f1 100644 --- a/tsl/test/expected/hypercore_join.out +++ b/tsl/test/expected/hypercore_join.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_merge.out b/tsl/test/expected/hypercore_merge.out index ff42586ae51..53800bff9af 100644 --- a/tsl/test/expected/hypercore_merge.out +++ b/tsl/test/expected/hypercore_merge.out @@ -41,10 +41,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -58,9 +54,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_parallel.out b/tsl/test/expected/hypercore_parallel.out index 8b71ec4419f..2e677a89c68 100644 --- a/tsl/test/expected/hypercore_parallel.out +++ b/tsl/test/expected/hypercore_parallel.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_stats.out b/tsl/test/expected/hypercore_stats.out index 7bb06c4dce1..e879163e441 100644 --- a/tsl/test/expected/hypercore_stats.out +++ b/tsl/test/expected/hypercore_stats.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_types.out b/tsl/test/expected/hypercore_types.out index 475546c4e48..728c011322f 100644 --- a/tsl/test/expected/hypercore_types.out +++ b/tsl/test/expected/hypercore_types.out @@ -35,10 +35,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -52,9 +48,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_update.out b/tsl/test/expected/hypercore_update.out index 6b259e5d709..4466d9efd63 100644 --- a/tsl/test/expected/hypercore_update.out +++ b/tsl/test/expected/hypercore_update.out @@ -41,10 +41,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -58,9 +54,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/expected/hypercore_vacuum_full.out b/tsl/test/expected/hypercore_vacuum_full.out index ac47b616036..82e2f3e1e8d 100644 --- a/tsl/test/expected/hypercore_vacuum_full.out +++ b/tsl/test/expected/hypercore_vacuum_full.out @@ -40,10 +40,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -57,9 +53,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end; diff --git a/tsl/test/sql/include/hypercore_helpers.sql b/tsl/test/sql/include/hypercore_helpers.sql index 31ea3576563..d8cf9906dab 100644 --- a/tsl/test/sql/include/hypercore_helpers.sql +++ b/tsl/test/sql/include/hypercore_helpers.sql @@ -33,10 +33,6 @@ begin for ln in execute format('explain (analyze, costs off, summary off, timing off, decompress_cache_stats) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; - return next anonymize(ln); end loop; end; @@ -51,9 +47,6 @@ begin for ln in execute format('explain (costs off, summary off, timing off) %s', $1) loop - if trim(both from ln) like 'Group Key:%' then - continue; - end if; return next anonymize(ln); end loop; end;