You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/21 06:54:37 UTC

[GitHub] [iceberg] lipenglin opened a new issue, #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

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

   https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java#L320
   
   The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' shows the timestamp in UTC timezone, this can be misleading to users who is in another timezone.
   
   e.g:
   When I snapshotIdAsOfTime('2022-06-17 11:00:00'), the error message show me 'Cannot find a snapshot older than 2022-06-17 09:00:00', because I'm not in UTC timezone.


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


[GitHub] [iceberg] lipenglin commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
lipenglin commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1192131359

   > Iceberg only works with UTC timestamps. All translation to UTC is done by engines. I think this is the correct behavior for Iceberg, but it may not be the correct behavior for an engine to just pass the error through.
   
   Thanks for your reply. That's fine, we're currently catching InternalException and converting it to the timezone that the user wants.


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


[GitHub] [iceberg] rdblue commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
rdblue commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1191776539

   Iceberg only works with UTC timestamps. All translation to UTC is done by engines. I think this is the correct behavior for Iceberg, but it may not be the correct behavior for an engine to just pass the timestamp through.


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


[GitHub] [iceberg] rdblue closed issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
rdblue closed issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.
URL: https://github.com/apache/iceberg/issues/5321


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


[GitHub] [iceberg] nastra commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
nastra commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1191794605

   We're doing https://github.com/apache/iceberg/blob/ffee32c48859eef2136f728438b1da613429fe7e/core/src/main/java/org/apache/iceberg/util/DateTimeUtil.java#L89 (aka reporting back without a time zone). 
   I wonder if changing this code to `Instant.ofEpochMilli(millis).atOffset(ZoneOffset.UTC).toZonedDateTime().toString()` would be good enough so that the TimeZone is shown in the string


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


[GitHub] [iceberg] rdblue commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
rdblue commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1191968188

   Will `toZonedDateTime` always show `+00:00`? I don't think adding `Z` would help much. I think adding the offset for log or error messages would be fine.


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


[GitHub] [iceberg] nastra commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
nastra commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1191168958

   I agree that this is confusing. I wonder if we should report back the timestamp in UTC to make this clearer


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


[GitHub] [iceberg] luckymeng commented on issue #5321: The error message of 'org.apache.iceberg.util.SnapshotUtil#snapshotIdAsOfTime' can be misleading to users.

Posted by GitBox <gi...@apache.org>.
luckymeng commented on issue #5321:
URL: https://github.com/apache/iceberg/issues/5321#issuecomment-1191112944

   您的来信已收到,谢谢。


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