pvary commented on a change in pull request #2512:
URL: https://github.com/apache/hive/pull/2512#discussion_r677459034
##########
File path:
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
##########
@@ -2271,6 +2274,116 @@ public void testStatWithPartitionedCTAS() {
checkColStat("target", "dept");
}
+ @Test
+ public void testAsOfTimestamp() throws IOException, InterruptedException {
+ Table table = prepareTableWithVersions(2);
+
+ List<Object[]> rows = shell.executeStatement(
+ "SELECT * FROM customers FOR SYSTEM_TIME AS OF '" +
timestampAfterSnapshot(table, 0) + "'");
+
+ Assert.assertEquals(3, rows.size());
+
+ rows = shell.executeStatement(
+ "SELECT * FROM customers FOR SYSTEM_TIME AS OF '" +
timestampAfterSnapshot(table, 1) + "'");
+
+ Assert.assertEquals(4, rows.size());
+
+ AssertHelpers.assertThrows("should throw exception",
IllegalArgumentException.class,
Review comment:
Yeah.. Iceberg table does not know anything about the current time. It
will show every change until the given timestamp
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]