Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24982 )

Change subject: IMPALA-15459: Add Iceberg-encoded theta sketch flavor for 
Puffin NDV stats
......................................................................


Patch Set 5:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/24982/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/24982/5//COMMIT_MSG@26
PS5, Line 26: Type
optional: UUID could be added, it is simply bytewise hash as Impala already 
stores them

there is no COMPUTE STATS for UUID yet, but it may come soon and having 
ds_theta_sketch_iceberg available would make it trivial to integrate with 
Puffin files


http://gerrit.cloudera.org:8080/#/c/24982/5//COMMIT_MSG@32
PS5, Line 32:   DOUBLE    | 8-byte LE             | 8-byte LE (same symbol)
Claude found a difference here:
datasketches normalizes doubles, which unifies different NaNs and -0/0 before 
hashing. Iceberg's Appandix D says to hash double's bytes as they are.

An example for the difference:

create table weird_doubles (d double);

insert into weird_doubles values (cast("nan" as double)), (cast("-nan" as 
double)), (cast("-0" as double)), (cast("0" as double));

select ndv(d) from weird_doubles; -- returns 4

select ds_theta_estimate(ds_theta_sketch(d)) from weird_doubles; -- returns 2

Honestly I think few people care about these values (and I also don't) - NaN is 
common but -0 and -NaN just cause trouble, but fixing this now  would save us 
from AI finding this issue again. Hive also normalizes them, so an Iceberg 
specific function could be added for DOUBLE that hash as byte array, similarly 
to float.


http://gerrit.cloudera.org:8080/#/c/24982/5//COMMIT_MSG@46
PS5, Line 46: does not affect Iceberg, whose timestamp type has microsecond 
precision.
It could be noted that TIMESTAMP in Iceberg is always timestamp without 
timezone, so no timezone conversion needs to be considered.



--
To view, visit http://gerrit.cloudera.org:8080/24982
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I78c76c38dffa9807eb13ad465afab0b80f31984a
Gerrit-Change-Number: 24982
Gerrit-PatchSet: 5
Gerrit-Owner: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Comment-Date: Thu, 29 Oct 2026 16:56:43 +0000
Gerrit-HasComments: Yes

Reply via email to