raminqaf commented on code in PR #28792:
URL: https://github.com/apache/flink/pull/28792#discussion_r3655063724
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlConnectionOperationConverterTest.java:
##########
@@ -121,4 +122,30 @@ void testCreateConnectionWithEmptyOptionsRejected() {
.isInstanceOf(SqlValidateException.class)
.hasMessageContaining("Connection property list can not be
empty.");
}
+
+ @Test
+ void testDescribeConnection() {
+ Operation operation = parse("DESCRIBE CONNECTION my_conn");
+ assertThat(operation).isInstanceOf(DescribeConnectionOperation.class);
+ DescribeConnectionOperation op = (DescribeConnectionOperation)
operation;
+
+ assertThat(op.getConnectionIdentifier())
+ .isEqualTo(ObjectIdentifier.of("builtin", "default",
"my_conn"));
+ assertThat(op.isExtended()).isFalse();
+ }
+
+ @Test
+ void testDescribeConnectionExtended() {
+ Operation operation = parse("DESC CONNECTION EXTENDED my_conn");
+ DescribeConnectionOperation op = (DescribeConnectionOperation)
operation;
+ assertThat(op.isExtended()).isTrue();
+ }
+
+ @Test
+ void testDescribeConnectionWithFullyQualifiedName() {
+ Operation operation = parse("DESCRIBE CONNECTION cat1.db1.my_conn");
+ DescribeConnectionOperation op = (DescribeConnectionOperation)
operation;
+ assertThat(op.getConnectionIdentifier())
+ .isEqualTo(ObjectIdentifier.of("cat1", "db1", "my_conn"));
+ }
Review Comment:
can be also parametized
--
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]