matriv commented on a change in pull request #18107:
URL: https://github.com/apache/flink/pull/18107#discussion_r769491195
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/SymbolArgumentTypeStrategy.java
##########
@@ -55,13 +55,15 @@ public SymbolArgumentTypeStrategy(Class<? extends Enum<?
extends TableSymbol>> s
}
}
- final SymbolType<?> symbolType = (SymbolType<?>)
argumentType.getLogicalType();
- if (symbolType.getSymbolClass() != symbolClass) {
+ if (!callContext.getArgumentValue(argumentPos,
symbolClass).isPresent()) {
if (throwOnFailure) {
throw callContext.newValidationError(
- "Unsupported argument symbol type. Expected symbol
'%s' but actual symbol was '%s'.",
+ "Unsupported argument symbol type. Expected symbol
'%s' but actual symbol was %s.",
symbolClass.getSimpleName(),
- symbolType.getDefaultConversion().getSimpleName());
+ callContext
+ .getArgumentValue(argumentPos, Enum.class)
Review comment:
If it's easy to have a test like that, would be nice for completeness.
--
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]