Skip to content

Commit

Permalink
Fix failure of Delta Lake testCaseUpdatePartitionColumnFails
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Nov 7, 2024
1 parent b5e2b24 commit d89e230
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import static io.trino.tests.product.utils.QueryExecutors.onDelta;
import static io.trino.tests.product.utils.QueryExecutors.onTrino;
import static java.lang.String.format;
import static java.util.Locale.ENGLISH;
import static java.util.function.Predicate.not;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
Expand Down Expand Up @@ -207,15 +206,8 @@ public void testCaseUpdateInPartition(String partitionColumn)
public void testCaseUpdatePartitionColumnFails(String partitionColumn)
{
try (CaseTestTable table = new CaseTestTable("update_case_compat", partitionColumn, List.of(row(1, 1, 1)))) {
// TODO: The test fails for uppercase columns because the statement analyzer compares the column name case-sensitively.
if (!partitionColumn.equals(partitionColumn.toLowerCase(ENGLISH))) {
assertQueryFailure(() -> onTrino().executeQuery(format("UPDATE delta.default.%s SET %s = 0 WHERE lower = 1", table.name(), partitionColumn)))
.hasMessageMatching(".*The UPDATE SET target column .* doesn't exist");
}
else {
onTrino().executeQuery(format("UPDATE delta.default.%s SET %s = 0 WHERE lower = 1", table.name(), partitionColumn));
assertTable(table, table.rows().map(row -> row.withPartition(0)));
}
onTrino().executeQuery(format("UPDATE delta.default.%s SET %s = 0 WHERE lower = 1", table.name(), partitionColumn));
assertTable(table, table.rows().map(row -> row.withPartition(0)));
}
}

Expand Down

0 comments on commit d89e230

Please sign in to comment.