Add CAST expression support to parser by nssalian · Pull Request #3207 · apache/iceberg-python
Closes #198
Picks up where #209 left off with @Fokko's feedback addressed. Thanks @jayceslesar for the original work.
Rationale for this change
Adds CAST(column AS type) parsing that maps to Iceberg transforms (date → DayTransform, year → YearTransform, month → MonthTransform, hour → HourTransform). Also implements BoundTransform.ref() and eval() — both were missing abstract methods required by BoundTerm. Introduces UnboundTransform with bind() that validates via can_transform().
Are these changes tested?
Yes. 11 new tests covering all transform types, case insensitivity, nested fields, unsupported types, comparison operators, and boolean composition.
Are there any user-facing changes?
No.