snuyanzin commented on code in PR #27775:
URL: https://github.com/apache/flink/pull/27775#discussion_r3074193962


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveCallByArgumentsRule.java:
##########
@@ -681,6 +681,23 @@ public List<DataType> getArgumentDataTypes() {
                     .collect(Collectors.toList());
         }
 
+        @Override
+        public Optional<String> getArgumentName(int pos) {
+            final ResolvedExpression arg = getArgument(pos);
+
+            if (arg instanceof CallExpression) {
+                final CallExpression call = (CallExpression) arg;
+                if (call.getFunctionDefinition() == 
BuiltInFunctionDefinitions.AS) {
+                    final List<ResolvedExpression> children = 
call.getResolvedChildren();
+                    if (children.size() >= 2 && children.get(1) instanceof 
ValueLiteralExpression) {
+                        return ((ValueLiteralExpression) 
children.get(1)).getValueAs(String.class);

Review Comment:
   ```suggestion
                           return ((ValueLiteralExpression) 
children.get(1)).getValueAs(NlsString.class);
   ```
   since it is a field name, probably better `NlsString`



-- 
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]

Reply via email to