milenkovicm commented on code in PR #2493:
URL: 
https://github.com/apache/datafusion-ballista/pull/2493#discussion_r4116932197


##########
ballista/core/src/planner.rs:
##########
@@ -293,6 +304,28 @@ mod test {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn should_not_detect_table_scanned_in_subquery() -> Result<()> {
+        let ctx = context();
+        ctx.sql("CREATE TABLE big (name VARCHAR)")
+            .await?
+            .show()
+            .await?;
+        // Unoptimized, so the subquery is still an expression rather than the
+        // join the optimizer would decorrelate it into.
+        let plan = ctx
+            .state()
+            .create_logical_plan(
+                "SELECT table_name FROM information_schema.tables \
+             WHERE table_name IN (SELECT name FROM big)",
+            )
+            .await?;
+
+        assert!(!super::scans_only_local_tables(&plan));

Review Comment:
   Until we find better solution failing queries make sense. 



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