From 5ff448cff2ce791c830292eda00634e8ef0f611e Mon Sep 17 00:00:00 2001 From: "Joshua (D) Drake" <136637981+ChronicallyJD@users.noreply.github.com> Date: Wed, 9 Sep 2026 23:50:13 +0000 Subject: [PATCH] docs: align SAOP exactness comments Co-authored-by: Cursor --- src/columnar_customscan.c | 7 ++++--- src/columnar_reader.c | 1 + src/columnar_vector.c | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/columnar_customscan.c b/src/columnar_customscan.c index 4632d9b3..302a7885 100644 --- a/src/columnar_customscan.c +++ b/src/columnar_customscan.c @@ -963,9 +963,10 @@ pgcolumnar_clause_to_scankey(Node *clause, Index scanrelid, TupleDesc tupdesc, *exact = false; /* - * `col IN (...)` / `col = ANY(array)` becomes a [min, max] range (#704). Its - * keys are conservative, so this returns with exact still false and the fold - * refuses them (#715). + * `col IN (...)` / `col = ANY(array)` becomes one set key, with a bounded + * [min,max] fallback above the element limit (#704, #752). Both forms are + * conservative pruning keys, so exact remains false and the fold refuses + * them as its complete row filter (#715). */ if (IsA(clause, ScalarArrayOpExpr)) return pgcolumnar_saop_scankey((ScalarArrayOpExpr *) clause, diff --git a/src/columnar_reader.c b/src/columnar_reader.c index 49c71646..30187ed2 100644 --- a/src/columnar_reader.c +++ b/src/columnar_reader.c @@ -778,6 +778,7 @@ pgcolumnar_make_predicates(SkipPredicate *out, int nkeys, ScanKey keys, bool elmbyval; char elmalign; + Assert(ARR_ELEMTYPE(arr) == key->sk_subtype); get_typlenbyvalalign(ARR_ELEMTYPE(arr), &elmlen, &elmbyval, &elmalign); deconstruct_array(arr, ARR_ELEMTYPE(arr), elmlen, elmbyval, diff --git a/src/columnar_vector.c b/src/columnar_vector.c index 1813d9f6..ba2a8994 100644 --- a/src/columnar_vector.c +++ b/src/columnar_vector.c @@ -3367,8 +3367,9 @@ pgcolumnar_batch_gates_ok(const PgColumnarAggSpec *specs, int naggs, * * The gate below is exactly the exactness marker the conservative keys need * kept out of the fold: PgColumnarBuildScanKeys emits keys WEAKER than their - * clause for a ScalarArrayOpExpr ([min, max] range, #704) and for an anchored - * LIKE (#426), and pgcolumnar_clause_to_scankey now reports that inexactness. + * clause for a ScalarArrayOpExpr (a set key with a bounded [min,max] + * fallback, #704/#752) and for an anchored LIKE (#426), and + * pgcolumnar_clause_to_scankey reports that inexactness. * PgColumnarQualsExactlyKeyed demands one EXACT key per clause, so those keys * never serve as the fold's WHERE even if pgcolumnar_clause_to_predicate were * later taught to accept a SAOP. The byval gather guard below is a second,