You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: metacat-connector-jdbc/src/main/java/com/netflix/metacat/connector/jdbc/services/JdbcConnectorTableService.java
+12-11
Original file line number
Diff line number
Diff line change
@@ -65,9 +65,9 @@ public class JdbcConnectorTableService implements ConnectorTableService {
65
65
privatestaticfinalcharLEFT_PAREN = '(';
66
66
privatestaticfinalcharRIGHT_PAREN = ')';
67
67
privatestaticfinalcharSPACE = ' ';
68
-
privatefinalDataSourcedataSource;
69
-
privatefinalJdbcTypeConvertertypeConverter;
68
+
protectedfinalDataSourcedataSource;
70
69
privatefinalJdbcExceptionMapperexceptionMapper;
70
+
privatefinalJdbcTypeConvertertypeConverter;
71
71
72
72
/**
73
73
* Constructor.
@@ -95,8 +95,7 @@ public void delete(@Nonnull final ConnectorRequestContext context, @Nonnull fina
95
95
finalStringdatabaseName = name.getDatabaseName();
96
96
finalStringtableName = name.getTableName();
97
97
log.debug("Attempting to delete table {} from database {} for request {}", tableName, databaseName, context);
Copy file name to clipboardexpand all lines: metacat-connector-snowflake/src/main/java/com/netflix/metacat/connector/snowflake/SnowflakeConnectorTableService.java
+21
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ public class SnowflakeConnectorTableService extends JdbcConnectorTableService {
55
55
privatestaticfinalStringSQL_GET_AUDIT_INFO
56
56
= "select created, last_altered from information_schema.tables"
57
57
+ " where table_catalog=? and table_schema=? and table_name=?";
58
+
58
59
/**
59
60
* Constructor.
60
61
*
@@ -130,6 +131,13 @@ public void rename(@Nonnull final ConnectorRequestContext context,
Copy file name to clipboardexpand all lines: metacat-connector-snowflake/src/test/groovy/com/netflix/metacat/connector/snowflake/SnowflakeConnectorTableServiceSpec.groovy
+8-2
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,8 @@ class SnowflakeConnectorTableServiceSpec extends Specification {
63
63
then:
64
64
1*this.dataSource.getConnection() >> connection
65
65
1* connection.createStatement() >> statement
66
-
1* connection.setSchema(database)
66
+
1* connection.getCatalog() >>"dse"
67
+
1* connection.setSchema(_)
67
68
1* statement.executeUpdate(
68
69
"DROP TABLE "+ table
69
70
)
@@ -83,7 +84,8 @@ class SnowflakeConnectorTableServiceSpec extends Specification {
83
84
then:
84
85
1*this.dataSource.getConnection() >> connection
85
86
1* connection.createStatement() >> statement
86
-
1* connection.setSchema(database)
87
+
1* connection.getCatalog() >>"dse"
88
+
1* connection.setSchema(_)
87
89
1* statement.executeUpdate(
88
90
"DROP TABLE "+ table
89
91
)
@@ -112,6 +114,8 @@ class SnowflakeConnectorTableServiceSpec extends Specification {
112
114
then:
113
115
1*this.dataSource.getConnection() >> connection
114
116
1* connection.createStatement() >> statement
117
+
1* connection.getCatalog() >>"dse"
118
+
2* connection.setSchema(_)
115
119
1* statement.executeUpdate(
116
120
"ALTER TABLE C RENAME TO D"
117
121
)
@@ -129,6 +133,8 @@ class SnowflakeConnectorTableServiceSpec extends Specification {
0 commit comments