NobiGo commented on code in PR #4708:
URL: https://github.com/apache/calcite/pull/4708#discussion_r2648829825


##########
testkit/src/main/java/org/apache/calcite/test/QuidemTest.java:
##########
@@ -246,6 +247,17 @@ protected void checkRun(String path) throws Exception {
               int thresholdValue = ((BigDecimal) value).intValue();
               
closer.add(Prepare.THREAD_INSUBQUERY_THRESHOLD.push(thresholdValue));
             }
+            if (propertyName.equals("trimfields")) {
+              final boolean b = value instanceof Boolean
+                  && (Boolean) value;
+              closer.add(

Review Comment:
   The first fields trimmer occurs after the SQL is converted into a RelNode. 
At this stage, the RelNode should be simplified before optimization, making 
subsequent optimization plans more lightweight. The second fields trimmer 
happens during or after optimization—during this phase, certain columns may no 
longer be needed. For example, a condition like (age <> 5 OR age = 5) can be 
directly simplified to True, allowing the age column to be eliminated.



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