[ 
https://issues.apache.org/jira/browse/HIVE-24664?focusedWorklogId=545778&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-545778
 ]

ASF GitHub Bot logged work on HIVE-24664:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Feb/21 03:47
            Start Date: 02/Feb/21 03:47
    Worklog Time Spent: 10m 
      Work Description: 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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 545778)
    Time Spent: 1h 40m  (was: 1.5h)

> Support column aliases in Values clause
> ---------------------------------------
>
>                 Key: HIVE-24664
>                 URL: https://issues.apache.org/jira/browse/HIVE-24664
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Enable explicitly specify column aliases in the first row of Values clause. 
> If not all the columns has alias specified generate one.
> {code:java}
> values(1, 2 b, 3 c),(4, 5, 6);
> {code}
> {code:java}
> _col1   b   c
>   1     2   3
>   4     5   6
> {code}
>  This is not an standard SQL feature but some database engines like Impala 
> supports it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to