yuzelin commented on code in PR #21141:
URL: https://github.com/apache/flink/pull/21141#discussion_r1044272601
##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/SqlGatewayServiceITCase.java:
##########
@@ -554,6 +554,55 @@ public void testListUserDefinedFunctions() {
"table_func0"))));
}
+ @Test
+ public void testCompleteStatement() throws Exception {
+ SessionHandle sessionHandle =
service.openSession(defaultSessionEnvironment);
+
+ String createTable1 =
+ "CREATE TABLE Table1 (\n"
+ + " IntegerField1 INT,\n"
+ + " StringField1 STRING,\n"
+ + " TimestampField1 TIMESTAMP(3)\n"
+ + ") WITH (\n"
+ + " 'connector' = 'datagen'\n"
+ + ")\n";
+ String createTable2 =
+ "CREATE TABLE Table2 (\n"
+ + " BooleanField BOOLEAN,\n"
+ + " StringField2 STRING,\n"
+ + " TimestampField2 TIMESTAMP\n"
+ + ") WITH (\n"
+ + " 'connector' = 'blackhole'\n"
+ + ")\n";
+
+ service.getSession(sessionHandle)
+ .createExecutor()
+ .getTableEnvironment()
+ .executeSql(createTable1);
+ service.getSession(sessionHandle)
+ .createExecutor()
+ .getTableEnvironment()
+ .executeSql(createTable2);
+
+ List<String> expectedTableHints =
+ Arrays.asList(
+ "default_catalog.default_database.Table1",
+ "default_catalog.default_database.Table2");
+ String incompleteSql = "SELECT * FROM Ta";
Review Comment:
Improved.
--
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]