You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "LiaCastaneda (via GitHub)" <gi...@apache.org> on 2026/06/01 09:59:15 UTC

Re: [PR] [branch-54] Gate new ScalarSubqueryExec node behind session property (#22530) [datafusion]

LiaCastaneda commented on code in PR #22690:
URL: https://github.com/apache/datafusion/pull/22690#discussion_r3333238858


##########
datafusion/sqllogictest/test_files/subquery.slt:
##########
@@ -2120,12 +2120,6 @@ SELECT x FROM sq_main WHERE x > (SELECT v FROM sq_values LIMIT 1);
 10
 20
 
-# Scalar subquery returning zero rows → NULL
-query I
-SELECT (SELECT v FROM sq_empty);
-----
-NULL

Review Comment:
   on branch-54 this query returns nothing (empty), on main it returns NULL because of https://github.com/apache/datafusion/pull/22316/changes. I think this is a preexisting bug (that the PR i mention fixed), the correct behavior is to return [null](https://www.pgtutorial.com/playground/?q=U0VMRUNUIChTRUxFQ1QgdiBGUk9NIChTRUxFQ1QgTlVMTDo6aW50IEFTIHYgTElNSVQgMCkgdCk7)
   
   Do we want to backport that PR as well?
   



-- 
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-unsubscribe@datafusion.apache.org

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


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