Mihaly Szjatinya created IMPALA-15787:
-----------------------------------------
Summary: Compute Puffin theta sketches in the column stats query
of COMPUTE STATS
Key: IMPALA-15787
URL: https://issues.apache.org/jira/browse/IMPALA-15787
Project: IMPALA
Issue Type: Improvement
Components: Frontend, Backend
Reporter: Mihaly Szjatinya
Assignee: Mihaly Szjatinya
With IMPALA-15004, COMPUTE STATS on an Iceberg table with
{{ICEBERG_WRITE_PUFFIN_STATS=true}} (the default) runs an extra child query
after the column stats query. That query computes a theta sketch per column
with {{ds_theta_sketch_iceberg()}} for the Puffin file, so the table is scanned
twice. In this mode the column stats query computes no {{NDV()}}.
Both can be done in a single scan by computing the sketch in place of the NDV
in the column stats query. The backend recognizes the sketch by its BINARY
result type and passes it to catalogd, which, as before, writes it to Puffin
and sets the NDV in HMS to the sketch's estimate. The column stats query then
has to run with {{TIMEZONE=UTC}}, which the timestamp hashing needs; no other
column stat depends on the time zone.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)