Skip to content

Commit

Permalink
Run testIncorrectIcebergFileSizes for ORC too
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Nov 24, 2021
1 parent ea633f9 commit 302d942
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@ public void testIncorrectIcebergFileSizes()
throws Exception
{
// Create a table with a single insert
assertUpdate("CREATE TABLE test_iceberg_file_size (x BIGINT) WITH (format='PARQUET')");
assertUpdate("CREATE TABLE test_iceberg_file_size (x BIGINT)");
assertUpdate("INSERT INTO test_iceberg_file_size VALUES (123), (456), (758)", 3);

// Get manifest file
Expand Down Expand Up @@ -2417,7 +2417,10 @@ public void testIncorrectIcebergFileSizes()
assertQuery(session, "SELECT * FROM test_iceberg_file_size", "VALUES (123), (456), (758)");

// Using Iceberg provided file size fails the query
assertQueryFails("SELECT * FROM test_iceberg_file_size", format("Error reading tail from .* with length %d", alteredValue));
assertQueryFails("SELECT * FROM test_iceberg_file_size",
format == ORC
? format(".*Error opening Iceberg split.*\\QIncorrect file size (%s) for file (end of stream not reached)\\E.*", alteredValue)
: format("Error reading tail from .* with length %d", alteredValue));

dropTable("test_iceberg_file_size");
}
Expand Down

0 comments on commit 302d942

Please sign in to comment.