Apache Iceberg version
0.11.0 (latest release)
Please describe the bug 🐞
DecimalLiteral.to(LongType) returns IntAboveMax()/IntBelowMin() instead of LongAboveMax()/LongBelowMin(). Looks like it was copied from the IntegerType handler without updating the sentinel types.
from decimal import Decimal
from pyiceberg.expressions.literals import DecimalLiteral
from pyiceberg.types import LongType
lit = DecimalLiteral(Decimal("99999999999999999999"))
result = lit.to(LongType())
print(type(result).__name__)
# Actual: IntAboveMax
# Expected: LongAboveMax
StringLiteral.to(LongType) correctly uses LongAboveMax/LongBelowMin for the same check.
Affected lines: expressions/literals.py:522 and :524
Fix: IntAboveMax() → LongAboveMax(), IntBelowMin() → LongBelowMin()
Willingness to contribute
Apache Iceberg version
0.11.0 (latest release)
Please describe the bug 🐞
DecimalLiteral.to(LongType)returnsIntAboveMax()/IntBelowMin()instead ofLongAboveMax()/LongBelowMin(). Looks like it was copied from theIntegerTypehandler without updating the sentinel types.StringLiteral.to(LongType)correctly usesLongAboveMax/LongBelowMinfor the same check.Affected lines: expressions/literals.py:522 and :524
Fix:
IntAboveMax()→LongAboveMax(),IntBelowMin()→LongBelowMin()Willingness to contribute