hequn8128 commented on a change in pull request #8493: [FLINK-12562][table]
Improve code in ExpandColumnFunctionsRule
URL: https://github.com/apache/flink/pull/8493#discussion_r291987130
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java
##########
@@ -193,7 +190,7 @@ public
ColumnsExpressionExpander(List<UnresolvedReferenceExpression> inputFieldR
@Override
protected List<UnresolvedReferenceExpression>
defaultMethod(Expression expression) {
- throw new TableException(
+ throw new ValidationException(
String.format("The parameters of %s() or %s()
only accept column name or column " +
Review comment:
Maybe `Preconditions.checkArgument` can also be used to validate user input,
such as the checkArgument in
`org.apache.flink.streaming.api.environment.StreamExecutionEnvironment`.
However, I think it also makes sense to change the
`Preconditions.checkArgument` to ValidationException. I will update the PR
according to your suggestions.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services