You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "rdblue (via GitHub)" <gi...@apache.org> on 2023/03/08 19:03:56 UTC

[GitHub] [iceberg] rdblue commented on pull request #6879: Python: Liberal Timestamp parsing

rdblue commented on PR #6879:
URL: https://github.com/apache/iceberg/pull/6879#issuecomment-1460709964

   The reason why we don't support this is that it is ambiguous. We don't know how to convert the timestamp without a zone to a specific UTC timestamp. We could assume the value is UTC or we could assume that the value is in the user's current time zone. Since it isn't obvious which one is correct or which one we've chosen, I'm worried that this would create time zone bugs in downstream code.
   
   There are probably alternatives:
   * We could add a "session time zone" like SQL and use that when it isn't specified. We can then default the session time zone to UTC
   * We could make helper methods for creating time literals, like `timestamp(iso8601: str, defaultZone: str = "+00:00") -> int` that make it clear what is happening by having a defined default
   
   What do you think about the alternatives, @Fokko?


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