Shekharrajak commented on code in PR #28790:
URL: https://github.com/apache/flink/pull/28790#discussion_r3667428474
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlConnectionOperationConverterTest.java:
##########
@@ -121,4 +124,45 @@ void testCreateConnectionWithEmptyOptionsRejected() {
.isInstanceOf(SqlValidateException.class)
.hasMessageContaining("Connection property list can not be
empty.");
}
+
+ @Test
+ void testShowConnections() {
+ Operation operation = parse("SHOW CONNECTIONS");
+ assertThat(operation).isInstanceOf(ShowConnectionsOperation.class);
+ assertThat(operation.asSummaryString()).isEqualTo("SHOW CONNECTIONS");
+ }
+
+ @Test
+ void testShowConnectionsWithDatabase() {
+ Operation operation = parse("SHOW CONNECTIONS FROM db1");
+ assertThat(operation).isInstanceOf(ShowConnectionsOperation.class);
+ assertThat(operation.asSummaryString()).isEqualTo("SHOW CONNECTIONS
FROM builtin.db1");
+ }
+
+ @Test
+ void testShowConnectionsWithCatalogAndDatabase() {
+ Operation operation = parse("SHOW CONNECTIONS IN cat1.db1");
+ assertThat(operation).isInstanceOf(ShowConnectionsOperation.class);
+ assertThat(operation.asSummaryString()).isEqualTo("SHOW CONNECTIONS IN
cat1.db1");
+ }
+
+ @Test
+ void testShowConnectionsLike() {
+ Operation operation = parse("SHOW CONNECTIONS LIKE '%conn%'");
+ assertThat(operation).isInstanceOf(ShowConnectionsOperation.class);
+ assertThat(operation.asSummaryString()).isEqualTo("SHOW CONNECTIONS
LIKE '%conn%'");
+ }
Review Comment:
Thanks updated
https://github.com/apache/flink/pull/28790/changes/e2484881683822ba371ad63e91caca0b3a6883cf
--
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]