zhouqingqing / qpmodel

A Relational Optimizer and Executor
MIT License
66 stars 18 forks source link

#issue72 subquery in select #234

Closed 9DemonFox closed 4 years ago

9DemonFox commented 4 years ago

This commit just solves the problem of one markerJoin in subquery like:

select c_name,
    (select count(O.o_orderkey) 
        from orders O 
        where O.o_custkey = 37) as OrderCount
from customer C
where exists
    (
        select *
        from nation N
        where C.c_nationkey=N.n_nationkey
        and N.n_regionkey=0
    )
order by c_name

During debug this issue, I meet many questions.