hackergin commented on code in PR #24106:
URL: https://github.com/apache/flink/pull/24106#discussion_r1465413612
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/BaseMappingExtractor.java:
##########
@@ -362,7 +363,17 @@ static Optional<FunctionArgumentTemplate>
tryExtractInputGroupArgument(
Method method, int paramPos) {
final Parameter parameter = method.getParameters()[paramPos];
final DataTypeHint hint = parameter.getAnnotation(DataTypeHint.class);
- if (hint != null) {
+ final ArgumentHint argumentHint =
parameter.getAnnotation(ArgumentHint.class);
+ if (hint != null && argumentHint != null) {
+ throw extractionError(
+ "ArgumentHint and DataTypeHint cannot be declared at the
same time.");
Review Comment:
parameters.getName can't get the real param name. I use position index
instread.
--
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]