You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2024/01/12 09:09:41 UTC
(flink) 02/02: [FLINK-32256] Remove argument count check
This is an automated email from the ASF dual-hosted git repository.
dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 1800b8744a4e68c7dfffdd15a3ac11f038082df5
Author: Dawid Wysakowicz <dw...@apache.org>
AuthorDate: Wed Jan 10 13:58:37 2024 +0100
[FLINK-32256] Remove argument count check
---
.../org/apache/flink/table/types/inference/TypeInferenceUtil.java | 5 -----
.../inference/strategies/ArrayComparableElementTypeStrategy.java | 5 -----
2 files changed, 10 deletions(-)
diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java
index 2e69044d7cf..8247ccad1b0 100644
--- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java
+++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java
@@ -344,11 +344,6 @@ public final class TypeInferenceUtil {
// --------------------------------------------------------------------------------------------
- public static boolean checkInputArgumentNumber(
- ArgumentCount argumentCount, int actualCount, boolean throwOnFailure) {
- return validateArgumentCount(argumentCount, actualCount, throwOnFailure);
- }
-
private static Result runTypeInferenceInternal(
TypeInference typeInference,
CallContext callContext,
diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayComparableElementTypeStrategy.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayComparableElementTypeStrategy.java
index c3e40e26647..175a41d45dd 100644
--- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayComparableElementTypeStrategy.java
+++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayComparableElementTypeStrategy.java
@@ -27,7 +27,6 @@ import org.apache.flink.table.types.inference.CallContext;
import org.apache.flink.table.types.inference.ConstantArgumentCount;
import org.apache.flink.table.types.inference.InputTypeStrategy;
import org.apache.flink.table.types.inference.Signature;
-import org.apache.flink.table.types.inference.TypeInferenceUtil;
import org.apache.flink.table.types.logical.LegacyTypeInformationType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.LogicalTypeFamily;
@@ -68,10 +67,6 @@ public final class ArrayComparableElementTypeStrategy implements InputTypeStrate
public Optional<List<DataType>> inferInputTypes(
CallContext callContext, boolean throwOnFailure) {
final List<DataType> argumentDataTypes = callContext.getArgumentDataTypes();
- if (!TypeInferenceUtil.checkInputArgumentNumber(
- argumentCount, argumentDataTypes.size(), throwOnFailure)) {
- return callContext.fail(throwOnFailure, "the input argument number should be one");
- }
final DataType argumentType = argumentDataTypes.get(0);
if (!argumentType.getLogicalType().is(LogicalTypeRoot.ARRAY)) {
return callContext.fail(throwOnFailure, "All arguments requires to be an ARRAY type");