twalthr commented on a change in pull request #18352:
URL: https://github.com/apache/flink/pull/18352#discussion_r784160659
##########
File path:
flink-table/flink-table-common/src/test/java/org/apache/flink/table/functions/UserDefinedFunctionHelperTest.java
##########
@@ -143,34 +162,27 @@ private void testErrorMessage() {
@Nullable String expectedErrorMessage;
- TestSpec(Class<? extends UserDefinedFunction> functionClass) {
+ TestSpec(
+ @Nullable Class<? extends UserDefinedFunction> functionClass,
+ @Nullable UserDefinedFunction functionInstance,
+ @Nullable CatalogFunction catalogFunction) {
this.functionClass = functionClass;
- this.functionInstance = null;
- this.catalogFunction = null;
- }
-
- TestSpec(UserDefinedFunction functionInstance) {
- this.functionClass = null;
this.functionInstance = functionInstance;
- this.catalogFunction = null;
- }
-
- TestSpec(CatalogFunction catalogFunction) {
- this.functionClass = null;
- this.functionInstance = null;
this.catalogFunction = catalogFunction;
}
static TestSpec forClass(Class<? extends UserDefinedFunction>
function) {
- return new TestSpec(function);
+ return new TestSpec(function, null, null);
}
static TestSpec forInstance(UserDefinedFunction function) {
- return new TestSpec(function);
+ return new TestSpec(null, function, null);
}
- static TestSpec forCatalogFunction(String className, FunctionLanguage
language) {
- return new TestSpec(new CatalogFunctionMock(className, language));
+ static TestSpec forCatalogFunction(
+ String className,
+ @SuppressWarnings("SameParameterValue") FunctionLanguage
language) {
Review comment:
You are right. I will simply always choose Java for now.
--
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]