laskoviymishka opened a new issue, #1216:
URL: https://github.com/apache/iceberg-go/issues/1216

   Phase 1 of #1215.
   
   ## What
   
   Add an internal, transform-aware helper that, given the current partition 
spec and a deduplicated set of partition tuples (as produced by 
`DataFile.Partition()`, keyed by partition field ID), returns a 
`BooleanExpression` matching exactly those partitions and nothing else.
   
   ## Shape
   
   - Input: the partition spec plus a set of partition tuples (field-ID → 
already-transformed value).
   - Output: an OR of per-partition predicates; each per-partition predicate is 
an AND across the spec's fields. A null partition value maps to `IsNull`; a 
present value maps to an equality built through the field's `Transform`, not an 
identity-only switch on Go types.
   - Deduplicate tuples canonically so repeated partitions collapse into one 
predicate.
   - Empty input maps to `AlwaysFalse`.
   
   ## Why standalone
   
   This is the only genuinely new logic in the feature and the part most likely 
to need iteration (transform handling, null semantics). Landing it alone keeps 
the Phase 2 wiring trivial and the predicate independently testable.
   
   ## Open design point
   
   The mechanism for non-identity transforms (e.g. matching files in `bucket(x) 
= 3` or `day(ts) = N`) needs to be settled here so Phase 2 can consume it 
directly — either a source-column row predicate where the transform is 
invertible, or partition-level matching against the manifest tuple. Resolving 
this is part of the phase.
   
   ## Tests
   
   - Identity transform, single and multiple fields.
   - Non-identity transform (bucket / day) handled correctly.
   - Null partition value → `IsNull`.
   - Duplicate tuples dedup to a single predicate.
   - Empty set → `AlwaysFalse`.
   
   ## Parity
   
   Mirror partition matching in `BaseReplacePartitions` / PyIceberg 
`_build_partition_predicate`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to