Jackie-Jiang commented on code in PR #13573:
URL: https://github.com/apache/pinot/pull/13573#discussion_r1673186855
##########
pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java:
##########
@@ -302,36 +263,22 @@ public enum TransformFunctionType {
private final String _name;
private final List<String> _alternativeNames;
- private final SqlKind _sqlKind;
private final SqlReturnTypeInference _returnTypeInference;
private final SqlOperandTypeChecker _operandTypeChecker;
- private final SqlFunctionCategory _sqlFunctionCategory;
TransformFunctionType(String name, String... alternativeNames) {
- this(name, null, null, null, null, alternativeNames);
- }
-
- TransformFunctionType(String name, SqlReturnTypeInference
returnTypeInference,
- SqlOperandTypeChecker operandTypeChecker, String... alternativeNames) {
- this(name, SqlKind.OTHER_FUNCTION, returnTypeInference, operandTypeChecker,
- SqlFunctionCategory.USER_DEFINED_FUNCTION, alternativeNames);
+ this(name, null, null, alternativeNames);
}
- /**
- * Constructor to use for transform functions which are supported in both v1
and multistage engines
- */
- TransformFunctionType(String name, SqlKind sqlKind, SqlReturnTypeInference
returnTypeInference,
- SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory
sqlFunctionCategory, String... alternativeNames) {
+ TransformFunctionType(String name, @Nullable SqlReturnTypeInference
returnTypeInference,
+ @Nullable SqlOperandTypeChecker operandTypeChecker, String...
alternativeNames) {
_name = name;
- List<String> all = new ArrayList<>(alternativeNames.length + 2);
- all.add(name);
- all.add(name());
- all.addAll(Arrays.asList(alternativeNames));
- _alternativeNames = Collections.unmodifiableList(all);
- _sqlKind = sqlKind;
+ List<String> names = new ArrayList<>(alternativeNames.length + 1);
+ names.add(name);
+ names.addAll(Arrays.asList(alternativeNames));
+ _alternativeNames = List.copyOf(names);
Review Comment:
Done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]