Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17765 )
Change subject: IMPALA-10840: Add support for "FOR SYSTEM_TIME AS OF" and "FOR SYSTEM_VERSION AS OF" for Iceberg tables ...................................................................... Patch Set 4: (6 comments) Thanks for the comments! http://gerrit.cloudera.org:8080/#/c/17765/4//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/17765/4//COMMIT_MSG@14 PS4, Line 14: > May need to describe the semantics of FOR SYSTEM_TIME AS OF and FOR SYSTEM_ Extended the commit message. http://gerrit.cloudera.org:8080/#/c/17765/4//COMMIT_MSG@18 PS4, Line 18: local timezone. > nit. Translating the local time to the time zone used for all the rows in t Added a sentence that timestamps are translated to UTC because the snapshots use UTC. http://gerrit.cloudera.org:8080/#/c/17765/4/fe/src/main/java/org/apache/impala/analysis/TimeTravelSpec.java File fe/src/main/java/org/apache/impala/analysis/TimeTravelSpec.java: http://gerrit.cloudera.org:8080/#/c/17765/4/fe/src/main/java/org/apache/impala/analysis/TimeTravelSpec.java@39 PS4, Line 39: TIME > nit. May use TIME_AS_OF. Other possibilities exist, such as TIME_FROM or TI Done. Updated VERSION to VERSION_AS_OF as well because we might add similar extensions for version-based time travel. http://gerrit.cloudera.org:8080/#/c/17765/4/fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java File fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java: http://gerrit.cloudera.org:8080/#/c/17765/4/fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java@4871 PS4, Line 4871: iceT); > nit. May add a test for a time in future, say 3 days from now(). Yeah I wasn't sure about what should be the behavior of future queries. Iceberg returns the current snapshot for them. MS SQL SERVER also returns the current state for future queries: http://sqlfiddle.com/#!18/fb878/10/0 So I might just add tests for this behavior. http://gerrit.cloudera.org:8080/#/c/17765/4/fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java@4880 PS4, Line 4880: > nit. May add a negative test case on system version of -10. version as of -10 raises a parse error. There's a test for it in ParserTest.java http://gerrit.cloudera.org:8080/#/c/17765/1/tests/query_test/test_iceberg.py File tests/query_test/test_iceberg.py: http://gerrit.cloudera.org:8080/#/c/17765/1/tests/query_test/test_iceberg.py@197 PS1, Line 197: SELECT * FROM {tbl} FOR SYSTEM_VERSION AS OF {v_old}""".format( > Sure, use your best judgement. Added a test query with a future timestamp. -- To view, visit http://gerrit.cloudera.org:8080/17765 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib523c5e47b8d9c377bea39a82fe20249177cf824 Gerrit-Change-Number: 17765 Gerrit-PatchSet: 4 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Attila Jeges <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Qifan Chen <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Fri, 27 Aug 2021 10:00:01 +0000 Gerrit-HasComments: Yes
