mihaibudiu commented on code in PR #3640:
URL: https://github.com/apache/calcite/pull/3640#discussion_r1459925492


##########
core/src/main/java/org/apache/calcite/prepare/Prepare.java:
##########
@@ -293,13 +293,6 @@ public PreparedResult prepareSql(
       root = root.withRel(decorrelate(sqlToRelConverter, sqlQuery, root.rel));
     }
 
-    if (configHolder.get().isTrimUnusedFields()) {

Review Comment:
   You are fixing a bug. If I understand correctly the bug happens here, 
because trimUnusedFields returns an incorrect plan. Is the bug in 
trimUnusedFields? Or does trimUnusedFields need some invariants being called, 
and the invariants are not established in this point? If the bug is in 
trimUnusedFields, this change only hides the bug but does not really fix it. 
That is my first question.
   
   I am not sure what you mean by "preferred". Preferences are subjective, but 
whether this is a bug or not is not a preference.



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