xuefuz commented on a change in pull request #9822: [FLINK-14216][table]
introduce temp system functions to FunctionCatalog
URL: https://github.com/apache/flink/pull/9822#discussion_r331333067
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
##########
@@ -240,13 +298,24 @@ public PlannerTypeInferenceUtil
getPlannerTypeInferenceUtil() {
return plannerTypeInferenceUtil;
}
- private void registerFunction(String name, FunctionDefinition
functionDefinition) {
- // TODO: should register to catalog
- userFunctions.put(normalizeName(name), functionDefinition);
+ private void registerTempSystemFunction(String name, FunctionDefinition
functionDefinition) {
+ tempSystemFunctions.put(normalizeName(name),
functionDefinition);
+ }
+
+ private void registerTempCatalogFunction(ObjectIdentifier oi,
FunctionDefinition functionDefinition) {
+ tempCatalogFunctions.put(normalizeObjectIdentifier(oi),
functionDefinition);
}
@VisibleForTesting
static String normalizeName(String name) {
return name.toUpperCase();
}
+
+ @VisibleForTesting
+ static ObjectIdentifier normalizeObjectIdentifier(ObjectIdentifier oi) {
+ return ObjectIdentifier.of(
+ oi.getCatalogName(),
+ oi.getDatabaseName(),
Review comment:
Don't we need to normalize the cat/db names as well, if they are case
insensitive.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services