jackylee-ch opened a new pull request, #10180:
URL: https://github.com/apache/paimon/pull/10180
## Purpose
A REST catalog query-auth column-masking / row-filter rule may carry a
date/time extraction transform. The Python `predicate_json_parser` raised
`Unknown transform type` for `YEAR`, `MONTH`, `DAY`, `HOUR`, `MINUTE`,
`SECOND`, `QUARTER` and `DAY_OF_YEAR`, so a table whose auth rule extracts
a calendar field failed to read at all.
## Change
- Add the eight calendar-field extractions to `_apply_predicate_transform`,
mirroring Java's `DateExtractTransform` subclasses (each returns INT,
`QUARTER = (month - 1) / 3 + 1`, the rest map one to one). A DATE column
is read at the start of its day (cast to a timestamp first, so
HOUR/MINUTE/SECOND are 0), matching Java's `LocalDate.atStartOfDay`;
nulls propagate.
- Only the unambiguous extractions are added here; the week-numbering
family and the date-arithmetic transforms are left for a follow-up.
## Tests
- Extractions over a timestamp column and a DATE column (midnight), plus
one wired through a `LEAF` filter. Verified non-vacuous.
Written with Claude Code; verification is mine.
--
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]