jonahgao commented on code in PR #10459:
URL: https://github.com/apache/datafusion/pull/10459#discussion_r1597638606


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -1154,12 +1154,12 @@ mod test {
         let table_scan = test_table_scan()?;
 
         let plan = LogicalPlanBuilder::from(table_scan)
-            .project(vec![lit(1) + col("a")])?
+            .project(vec![lit(1) + col("a"), col("a")])?

Review Comment:
   It corresponds to `select a+1 from (select a+1 from t)`, which is not a 
valid query.
   ```sh
   > select a+1 from (select a+1 from t);
   Schema error: No field named a. Valid fields are "t.a + Int64(1)"
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to