Arnab Karmakar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24871
Change subject: IMPALA-15203: Add aggregate function support for UUID columns ...................................................................... IMPALA-15203: Add aggregate function support for UUID columns This patch adds support for common aggregate functions on Iceberg UUID columns, including COUNT, MIN, MAX, COUNT(DISTINCT), NDV, and sampled_ndv. MIN/MAX comparisons use RFC 4122 byte ordering on the raw 16-byte representation. For approximate distinct counting (NDV and sampled_ndv), UUID reuses the existing STRING HLL update functions since both types cross the UDF boundary as StringVal and require the same hashing behavior. Key changes: - Implement MinUuid and MaxUuid aggregate update functions that compare raw 16-byte UUID values. - Exclude UUID from codegen optimizations that assume numeric MIN/MAX semantics (default-value initialization and null-bit min/max shortcuts). - Register count/min/max builtins for UUID. Extract registerHllNdvBuiltins() helper method to cleanly register ndv, ndv(precision), ndv_no_finalize, and sampled_ndv for all eligible types including UUID. Testing: - Add positive test cases for MIN, MAX, COUNT, COUNT(DISTINCT), GROUP BY, NDV with precision, sampled_ndv, and HAVING clauses. - Retain negative tests confirming that SUM and AVG are correctly rejected at analysis time for UUID. Change-Id: I2187495c8be5b95ecff3f458b6549916466e9c83 Assisted-by: Composer 2.5 (Cursor) --- M be/src/exec/aggregator.cc M be/src/exec/hash-table.cc M be/src/exprs/agg-fn-evaluator.cc M be/src/exprs/aggregate-functions-ir.cc M be/src/exprs/aggregate-functions.h M fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java M testdata/workloads/functional-query/queries/QueryTest/iceberg-uuid-type.test 7 files changed, 221 insertions(+), 83 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/71/24871/1 -- To view, visit http://gerrit.cloudera.org:8080/24871 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2187495c8be5b95ecff3f458b6549916466e9c83 Gerrit-Change-Number: 24871 Gerrit-PatchSet: 1 Gerrit-Owner: Arnab Karmakar <[email protected]>
