Skip to content

Commit

Permalink
Make hidden column tests independent
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 9, 2024
1 parent c9d1a8c commit fb1a4c8
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -979,20 +979,28 @@ public void testPartitionedTable()
}

@Test
public void testPath()
public void testPathHiddenColumn()
{
assertQuery("SELECT \"$path\", * from orders");

// Fetch one of the file paths and use it in a filter
String path = (String) computeActual("SELECT \"$path\" from orders LIMIT 1").getOnlyValue();
assertQuery(format("SELECT * from orders WHERE \"$path\"='%s'", path));
}

@Test
public void testFileSizeHiddenColumn()
{
assertQuery("SELECT \"$file_size\", * from orders");

// Fetch one of the file sizes and use it in a filter
Long fileSize = (Long) computeActual("SELECT \"$file_size\" from orders LIMIT 1").getOnlyValue();
assertQuery(format("SELECT * from orders WHERE \"$file_size\"=%d", fileSize));
}

@Test
public void testFileModifiedTimeHiddenColumn()
{
assertQuery("SELECT \"$file_modified_time\", * from orders");

// Fetch one of the file modified times and use it as a filter.
Expand Down

0 comments on commit fb1a4c8

Please sign in to comment.