Skip to content

Commit

Permalink
Tweak validation of BaseCaseInsensitiveMappingTest
Browse files Browse the repository at this point in the history
Some databases may map varchar(5) to different types.
  • Loading branch information
ebyhr committed Nov 22, 2024
1 parent afe471b commit 365bb07
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ public void testTableNameRuleMapping()
AutoCloseable ignore1 = withTable(schema, "remote_table", "(c varchar(5))")) {
assertThat(computeActual("SHOW TABLES FROM " + schema).getOnlyColumn())
.contains("trino_table");
assertQuery("SHOW COLUMNS FROM " + schema + ".trino_table", "SELECT 'c', 'varchar(5)', '', ''");
assertThat(query("SHOW COLUMNS FROM " + schema + ".trino_table")).result().projected("Column").onlyColumnAsSet()
.contains("c");
assertUpdate("INSERT INTO " + schema + ".trino_table VALUES 'dane'", 1);
assertQuery("SELECT * FROM " + schema + ".trino_table", "VALUES 'dane'");
}
Expand Down Expand Up @@ -324,7 +325,8 @@ public void testSchemaAndTableNameRuleMapping()
.contains("trino_schema");
assertThat(computeActual("SHOW TABLES IN trino_schema").getOnlyColumn())
.contains("trino_table");
assertQuery("SHOW COLUMNS FROM trino_schema.trino_table", "SELECT 'c', 'varchar(5)', '', ''");
assertThat(query("SHOW COLUMNS FROM trino_schema.trino_table")).result().projected("Column").onlyColumnAsSet()
.contains("c");
assertUpdate("INSERT INTO trino_schema.trino_table VALUES 'dane'", 1);
assertQuery("SELECT * FROM trino_schema.trino_table", "VALUES 'dane'");
}
Expand Down

0 comments on commit 365bb07

Please sign in to comment.