abnobdoss opened a new issue, #3469:
URL: https://github.com/apache/iceberg-python/issues/3469

   ### 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.
   
   ```python
   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
   
   - [x] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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