Skip to content

[UUID 4c] CASE, IN and comparison transforms over the logical UUID type - #19183

Open
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:uuid-split/04c-transforms
Open

[UUID 4c] CASE, IN and comparison transforms over the logical UUID type#19183
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:uuid-split/04c-transforms

Conversation

@xiangfu0

@xiangfu0 xiangfu0 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What

Adds logical UUID handling and regression coverage for CASE, IN, and binary comparison transforms.

CaseTransformFunction

UUID results use the BYTES stored path. A bare STRING branch must be the fixed-width 32-character hex encoding of the 16 UUID bytes. Canonical dashed UUID text must be written as CAST('...' AS UUID). The null-aware bytes path also initializes the bytes result buffer correctly.

InTransformFunction

UUID membership reuses the existing BYTES stored path. Bare literals must be fixed-width hex; canonical dashed text must use CAST(... AS UUID). This PR adds regression coverage for uppercase hex, explicit UUID casts, and rejection of bare canonical strings.

BinaryOperatorTransformFunction

Binary comparisons already dispatch through stored BYTES. This PR adds dictionary/raw UUID regression coverage and improves comparison diagnostics and documentation.

Testing

  • Six concrete binary comparison transform suites
  • CASE UUID hex and CAST branches, including rejection of a bare canonical string
  • IN UUID hex and CAST operands, including rejection of a bare canonical string

About this PR

Split out of #18872. Part of #18140. Prerequisites #19181 and #19182 are merged.

xiangfu0 added a commit to xiangfu0/pinot that referenced this pull request Aug 7, 2026
Adds UUID handling to the predicate evaluators, so =, !=, IN, NOT IN and range
predicates work against a UUID column on both the raw and the dictionary path.

UUID follows the pattern TIMESTAMP already uses: a logical type whose stored
type does the work. The literal is parsed to its 16-byte stored form once, when
the evaluator is built, and from there the existing BYTES evaluators apply --
no per-value conversion in the scan loop.

The dictionary path needs no UUID branch: Dictionary#getStoredValue returns hex
for a UUID column and indexOf(String) hex-decodes, so the existing String-keyed
lookup is already correct. PredicateUtils renders the literal to that hex form
for those String-typed lookup APIs.

Split into apache#19181 (CAST), apache#19182 (bloom filter pruning) and apache#19183 (transform
functions); this PR is now just the predicate evaluators.
@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.64%. Comparing base (baaf0a7) to head (86e8f72).

Files with missing lines Patch % Lines
...ator/transform/function/CaseTransformFunction.java 42.85% 4 Missing ⚠️
...form/function/BinaryOperatorTransformFunction.java 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19183      +/-   ##
============================================
+ Coverage     66.62%   66.64%   +0.01%     
  Complexity     1423     1423              
============================================
  Files          3443     3443              
  Lines        218626   218632       +6     
  Branches      34792    34793       +1     
============================================
+ Hits         145662   145702      +40     
+ Misses        61240    61208      -32     
+ Partials      11724    11722       -2     
Flag Coverage Δ
custom-integration1 ?
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 ?
java-25 66.64% <64.70%> (+0.01%) ⬆️
temurin 66.64% <64.70%> (+0.01%) ⬆️
unittests 66.63% <64.70%> (+0.01%) ⬆️
unittests1 57.21% <64.70%> (+0.01%) ⬆️
unittests2 38.90% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

xiangfu0 added a commit to xiangfu0/pinot that referenced this pull request Aug 7, 2026
Adds UUID handling to the predicate evaluators, so =, !=, IN, NOT IN and range
predicates work against a UUID column on both the raw and the dictionary path.

UUID follows the pattern TIMESTAMP already uses: a logical type whose stored
type does the work. The literal is parsed to its 16-byte stored form once, when
the evaluator is built, and from there the existing BYTES evaluators apply --
no per-value conversion in the scan loop.

The dictionary path needs no UUID branch: Dictionary#getStoredValue returns hex
for a UUID column and indexOf(String) hex-decodes, so the existing String-keyed
lookup is already correct. PredicateUtils renders the literal to that hex form
for those String-typed lookup APIs.

Split into apache#19181 (CAST), apache#19182 (bloom filter pruning) and apache#19183 (transform
functions); this PR is now just the predicate evaluators.
@xiangfu0
xiangfu0 force-pushed the uuid-split/04c-transforms branch from dc7bd30 to 0277638 Compare August 7, 2026 23:41
@Jackie-Jiang Jackie-Jiang added the feature New functionality label Aug 7, 2026
@xiangfu0
xiangfu0 force-pushed the uuid-split/04c-transforms branch 3 times, most recently from af0fbd4 to 0959699 Compare August 8, 2026 00:25
return _bytesValuesSV;
}


Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it

Add UUID transform regression coverage and stored-byte handling for CASE.

- CASE validates bare UUID branches as fixed-width hex and initializes the bytes result buffer for null-aware evaluation; canonical dashed values require CAST(... AS UUID).
- IN already uses the BYTES stored path; cover uppercase hex, explicit UUID casts, and rejection of bare canonical strings.
- Binary comparisons already dispatch through BYTES stored types; add dictionary/raw regression coverage and improve diagnostics and comparator documentation.

Split out of apache#18872. Prerequisite UUID changes apache#19181 and apache#19182 are now on master.
@xiangfu0
xiangfu0 force-pushed the uuid-split/04c-transforms branch from 0959699 to 86e8f72 Compare August 8, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants