jcamachor commented on a change in pull request #1892:
URL: https://github.com/apache/hive/pull/1892#discussion_r568302310



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/type/RexNodeExprFactory.java
##########
@@ -1000,6 +1003,21 @@ protected FunctionInfo getFunctionInfo(String funcName) 
throws SemanticException
     return functionHelper.getFunctionInfo(funcName);
   }
 
+  @Override
+  protected RexNode replaceFieldNamesInStruct(RexNode expr, List<String> 
newFieldNames) {
+    if (newFieldNames.isEmpty()) {
+      return expr;
+    }
+
+    RexCall structCall = (RexCall) expr;
+    List<RexNode> newOperands = structCall.operands.stream()
+            .filter(rexNode -> "_UTF-16LE'tok_alias':VARCHAR(2147483647) 
CHARACTER SET \"UTF-16LE\"".compareTo(rexNode.toString()) != 0)

Review comment:
       Have you considered skipping the token in `TypeCheckProcFactory` rather 
than here? I think you could do that if it would not extend `StrExprProcessor`. 
If you cannot, maybe you can return a 'placeholder' object (static final) that 
you can identify easily with == ?
   I think that would simplify the implementation.
   Also note that tokens are not handled directly by the `ExprFactory` 
implementation.
   




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to