manisin commented on code in PR #6674:
URL: https://github.com/apache/iceberg/pull/6674#discussion_r1089421841
##########
snowflake/src/test/java/org/apache/iceberg/snowflake/JdbcSnowflakeClientTest.java:
##########
@@ -79,46 +79,24 @@ public void testNullClientPoolInConstructor() {
@Test
public void testDatabaseExists() throws SQLException {
when(mockResultSet.next()).thenReturn(true).thenReturn(false);
- when(mockResultSet.getString("name")).thenReturn("DB_1");
+ when(mockResultSet.getString("database_name")).thenReturn("DB_1");
+ when(mockResultSet.getString("name")).thenReturn("SCHEMA_1");
Assertions.assertThat(snowflakeClient.databaseExists(SnowflakeIdentifier.ofDatabase("DB_1")))
.isTrue();
verify(mockQueryHarness)
.query(
eq(mockConnection),
- eq("SHOW DATABASES LIKE 'DB_1' IN ACCOUNT"),
- any(JdbcSnowflakeClient.ResultSetParser.class));
- }
-
- @Test
- public void testDatabaseExistsSpecialCharacters() throws SQLException {
Review Comment:
I have removed all the code that added custom massaging for the special
characters by removing the use of LIKE clause. The onus is on the user to pass
the identifiers with special characters as quoted ( and escape/enclose them
correctly) based on the syntax specified by snowflake's identifier
documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]