You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/10 12:16:35 UTC

[GitHub] [flink] hequn8128 commented on a change in pull request #8493: [FLINK-12562][table] Improve code in ExpandColumnFunctionsRule

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:
users@infra.apache.org


With regards,
Apache Git Services