Skip to content

Commit

Permalink
Fix invalid argument name reporting in PTF analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi authored and kasiafi committed May 20, 2022
1 parent 11731fc commit 9afbb73
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1586,11 +1586,11 @@ private Map<String, Argument> analyzeArguments(Node node, List<ArgumentSpecifica
for (TableFunctionArgument argument : arguments) {
String argumentName = argument.getName().get().getCanonicalValue();
if (!uniqueArgumentNames.add(argumentName)) {
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Duplicate argument name: ", argumentName);
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Duplicate argument name: " + argumentName);
}
ArgumentSpecification argumentSpecification = argumentSpecificationsByName.remove(argumentName);
if (argumentSpecification == null) {
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Unexpected argument name: ", argumentName);
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Unexpected argument name: " + argumentName);
}
passedArguments.put(argumentSpecification.getName(), analyzeArgument(argumentSpecification, argument));
}
Expand Down Expand Up @@ -1629,7 +1629,7 @@ else if (argument.getValue() instanceof Expression) {
actualType = "expression";
}
else {
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Unexpected table function argument type: ", argument.getClass().getSimpleName());
throw semanticException(INVALID_FUNCTION_ARGUMENT, argument, "Unexpected table function argument type: " + argument.getClass().getSimpleName());
}

if (argumentSpecification instanceof TableArgumentSpecification) {
Expand Down

0 comments on commit 9afbb73

Please sign in to comment.