Skip to content

Commit

Permalink
Add test for AS OF syntax with system tables
Browse files Browse the repository at this point in the history
  • Loading branch information
phd3 committed Jun 22, 2022
1 parent 0a4d4eb commit 288be0a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public void testEndVersionInTableNameAndForClauseShouldFail()
"Cannot specify end version both in table name and FOR clause");
}

@Test
public void testSystemTables()
{
// TODO https://github.com/trinodb/trino/issues/12920
assertQueryFails("SELECT * FROM \"test_iceberg_read_versioned_table$partitions\" FOR VERSION AS OF " + v1SnapshotId,
"This connector does not support versioned tables");
}

private long getLatestSnapshotId(String tableName)
{
return (long) computeActual(format("SELECT snapshot_id FROM \"%s$snapshots\" ORDER BY committed_at DESC LIMIT 1", tableName))
Expand Down

0 comments on commit 288be0a

Please sign in to comment.