soumyakanti3578 commented on code in PR #6103:
URL: https://github.com/apache/hive/pull/6103#discussion_r2467769392


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java:
##########
@@ -182,6 +184,7 @@ protected TrimResult trimChild(
       RelNode input,
       final ImmutableBitSet fieldsUsed,
       Set<RelDataTypeField> extraFields) {
+    setColumnAccessInfoForViews(rel, fieldsUsed);

Review Comment:
   Actually although we were in the `trimChild` method, I was using passing 
`rel` which is the parent and not `input` which is actually the child.
   
   But I have had to change the code anyway because of test failures. I 
realized that we cannot call `setColumnAccessInfoForViews` in `trimChild` as 
it's too late because we may mutate `fieldsUsed` in `trimFields` before calling 
`trimChild`.
   
   In the new version I have moved the call to `setColumnAccessInfoForViews` 
just before we call `RelFieldTrimmer.trimFields` which is the right place to 
call it in my opinion. Let me know if you have any thoughts about this :) 



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


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

Reply via email to