luoyuxia commented on code in PR #24397:
URL: https://github.com/apache/flink/pull/24397#discussion_r1506889418
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/ProcedureITCase.java:
##########
@@ -210,6 +214,31 @@ void testNamedArgumentsWithOptionalArguments() {
ResolvedSchema.of(Column.physical("result",
DataTypes.STRING())));
}
+ @Test
+ void testEnvironmentConf() throws DatabaseAlreadyExistException {
+ // root conf should work
+ Configuration configuration = new Configuration();
+ configuration.setString("key1", "value1");
+ StreamExecutionEnvironment env =
+
StreamExecutionEnvironment.getExecutionEnvironment(configuration);
+ StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
+ TestProcedureCatalogFactory.CatalogWithBuiltInProcedure
procedureCatalog =
+ new
TestProcedureCatalogFactory.CatalogWithBuiltInProcedure("procedure_catalog");
+ procedureCatalog.createDatabase(
+ "system", new CatalogDatabaseImpl(Collections.emptyMap(),
null), true);
+ tableEnv.registerCatalog("test_p", procedureCatalog);
+ tableEnv.useCatalog("test_p");
Review Comment:
Can you please also add a property ("key1, "value22") to table config , and
then call the get_env_conf to make sure we can get both table configuration and
root configuration
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/PlannerCallProcedureOperation.java:
##########
@@ -138,6 +137,14 @@ private Object[] getConvertedArgumentValues(
return argumentVal;
}
+ private ProcedureContext getProcedureContext(TableConfig tableConfig) {
+ Configuration configuration = (Configuration)
tableConfig.getRootConfiguration();
Review Comment:
nit:
Configuration configuration = new
Configuration(tableConfig.getRootConfiguration());
--
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]