[ 
https://issues.apache.org/jira/browse/DRILL-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16914446#comment-16914446
 ] 

ASF GitHub Bot commented on DRILL-7253:
---------------------------------------

vvysotskyi commented on pull request #1847: DRILL-7253: Read Hive struct w/o 
nulls
URL: https://github.com/apache/drill/pull/1847#discussion_r317200826
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java
 ##########
 @@ -215,7 +215,18 @@ public LogicalExpression visitCall(RexCall call) {
         switch(call.getKind()){
         case CAST:
           return getDrillCastFunctionFromOptiq(call);
-        case LIKE:
+        case ROW:
+          List<RelDataTypeField> fieldList = call.getType().getFieldList();
+          List<RexNode> oldOperands = call.getOperands();
+          List<LogicalExpression> newOperands = new ArrayList<>();
+          for (int i = 0; i < oldOperands.size(); i++) {
+            RexLiteral nameOperand = 
getRexBuilder().makeLiteral(fieldList.get(i).getName());
+            RexNode valueOperand = call.operands.get(i);
+            newOperands.add(nameOperand.accept(this));
+            newOperands.add(valueOperand.accept(this));
+          }
+          return 
FunctionCallFactory.createExpression(call.op.getName().toLowerCase(), 
newOperands);
+          case LIKE:
 
 Review comment:
   ```suggestion
           case LIKE:
   ```
 
----------------------------------------------------------------
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


> Read Hive struct w/o nulls
> --------------------------
>
>                 Key: DRILL-7253
>                 URL: https://issues.apache.org/jira/browse/DRILL-7253
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Igor Guzenko
>            Assignee: Igor Guzenko
>            Priority: Major
>             Fix For: 1.17.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to