twalthr commented on a change in pull request #18107:
URL: https://github.com/apache/flink/pull/18107#discussion_r769481721
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/SymbolArgumentTypeStrategy.java
##########
@@ -45,7 +44,8 @@ public SymbolArgumentTypeStrategy(Class<? extends Enum<?
extends TableSymbol>> s
public Optional<DataType> inferArgumentType(
CallContext callContext, int argumentPos, boolean throwOnFailure) {
final DataType argumentType =
callContext.getArgumentDataTypes().get(argumentPos);
- if (argumentType.getLogicalType().getTypeRoot() !=
LogicalTypeRoot.SYMBOL) {
+ if (argumentType.getLogicalType().getTypeRoot() !=
LogicalTypeRoot.SYMBOL
+ || !callContext.isArgumentLiteral(argumentPos)) {
Review comment:
This is always needed before calling `getArgumentValue` as written in
the JavaDocs. A user would need to create a weird expression to have a symbol
that is not a literal.
--
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]