dawidwys commented on code in PR #22922:
URL: https://github.com/apache/flink/pull/22922#discussion_r1251694324
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayComparableElementTypeStrategy.java:
##########
@@ -67,6 +67,9 @@ public ArgumentCount getArgumentCount() {
public Optional<List<DataType>> inferInputTypes(
CallContext callContext, boolean throwOnFailure) {
final List<DataType> argumentDataTypes =
callContext.getArgumentDataTypes();
+ if (argumentDataTypes.size() < 1) {
+ return Optional.empty();
+ }
Review Comment:
hmm.. in my opinion that should not be the case.
I am afraid there is a bug in the Calcite's stack inference logic and the
argument count check is not performed correctly. I think we should rather adapt
https://github.com/apache/flink/blob/ab70dcfa19827febd2c3cdc5cb81e942caa5b2f0/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/inference/TypeInferenceOperandInference.java#L81
to perform the count range check. Similarly like
https://github.com/apache/flink/blob/fbc086f2fd63dac4af3e104ba4011e864781139a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java#L303
does.
I need to double check that with @twalthr
--
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]