You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "xxlaykxx (via GitHub)" <gi...@apache.org> on 2025/05/27 06:52:20 UTC

[I] Literals.LongLiteral conversion issue to TimestampNanoLiteral [iceberg]

xxlaykxx opened a new issue, #13160:
URL: https://github.com/apache/iceberg/issues/13160

   ### Apache Iceberg version
   
   1.9.0 (latest release)
   
   ### Query engine
   
   Dremio
   
   ### Please describe the bug 🐞
   
   Because for the conversion to TimestampNanoLiteral, LongLiteral use
   
   ```
   case TIMESTAMP_NANO:
             // assume micros and convert to nanos to match the behavior in the timestamp case above
             return new TimestampLiteral(value()).to(type);
   ```
   and if the long value representation of the timestamp nano, it causes
   
   ```
   SYSTEM ERROR: ArithmeticException: long overflow
     (java.lang.ArithmeticException) long overflow
       java.lang.Math.multiplyExact():1032
       org.apache.iceberg.util.DateTimeUtil.microsToNanos():101
       org.apache.iceberg.expressions.Literals$TimestampLiteral.to():445
       org.apache.iceberg.expressions.Literals$LongLiteral.to():304
   ```
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [x] 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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Literals.LongLiteral conversion issue to TimestampNanoLiteral [iceberg]

Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on issue #13160:
URL: https://github.com/apache/iceberg/issues/13160#issuecomment-3162121165

   I think we can close this issue now. 
   cc: @rdblue 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Literals.LongLiteral conversion issue to TimestampNanoLiteral [iceberg]

Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on issue #13160:
URL: https://github.com/apache/iceberg/issues/13160#issuecomment-2914854172

   We have an existing PR #11775


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Literals.LongLiteral conversion issue to TimestampNanoLiteral [iceberg]

Posted by "xxlaykxx (via GitHub)" <gi...@apache.org>.
xxlaykxx closed issue #13160: Literals.LongLiteral conversion issue to TimestampNanoLiteral
URL: https://github.com/apache/iceberg/issues/13160


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org