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/03/30 23:36:59 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #4436: Python: Updates to literals

rdblue commented on a change in pull request #4436:
URL: https://github.com/apache/iceberg/pull/4436#discussion_r839049200



##########
File path: python/src/iceberg/expression/literals.py
##########
@@ -51,7 +52,12 @@
     UUIDType,
 )
 
-EPOCH = datetime.datetime.utcfromtimestamp(0)
+
+EPOCH_DATE = date.fromisoformat("1970-01-01")
+EPOCH_TIMESTAMP = datetime.fromisoformat("1970-01-01T00:00:00.000000")
+ISO_TIMESTAMP = re.compile(r"\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(.\d{1,6})?")
+EPOCH_TIMESTAMPTZ = datetime.fromisoformat("1970-01-01T00:00:00.000000+00:00")

Review comment:
       I think it's fine since these are usually one word.

##########
File path: python/src/iceberg/expression/literals.py
##########
@@ -19,10 +19,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import datetime
+from datetime import datetime, date, time

Review comment:
       Done.




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