NobiGo commented on PR #4235: URL: https://github.com/apache/calcite/pull/4235#issuecomment-2785690741
> hi @NobiGo > > ```sql > create table correlated_scalar_t1(c1 bigint, c2 bigint); > create table correlated_scalar_t2(c1 bigint, c2 bigint); > insert into correlated_scalar_t1 values (1,null),(null,1),(1,2), (null,2),(1,3), (2,4), (2,5), (3,3), (3,4), (20,2), (22,3), (24,4),(null,null); > insert into correlated_scalar_t2 values (1,null),(null,1),(1,4), (1,2), (null,3), (2,4), (3,7), (3,9),(null,null),(5,1); > > select c1 from correlated_scalar_t1 where correlated_scalar_t1.c2 > (select c1 from correlated_scalar_t2 where correlated_scalar_t1.c1 = correlated_scalar_t2.c1 and correlated_scalar_t2.c2 < 4) order by c1; > ``` > > can you add this case into calicte and check correctness? > > ```sql > with t1 (c1, c2) as (values (1,null),(null,1),(1,2), (null,2),(1,3), (2,4), (2,5), (3,3), (3,4), (20,2), (22,3), (24,4),(null,null)), t2 (c1, c2) as (values (1,null),(null,1),(1,4), (1,2), (null,3), (2,4), (3,7), (3,9),(null,null),(5,1)) select c1 from t1 where t1.c2 > (select c1 from t2 where t1.c1 = t2.c1 and t2.c2 < 4) order by c1; > ``` This is an open-source project. You can freely verify it. If you encounter a new problem, you can register it in Jira. -- 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]
