antonmks / Alenka

GPU database engine
Other
1.17k stars 120 forks source link

Can I use multiple predicates in the JOIN? #28

Closed AlexeyAB closed 11 years ago

AlexeyAB commented 11 years ago

Hi Anton! Can I use multiple predicates in the JOIN? An example in q2m.sql if I add AND ps_partkey = s_suppkey:

J_PS := SELECT n_name AS n_name, ps_partkey AS ps_partkey, ps_supplycost AS ps_supplycost, s_name AS s_name, s_address AS s_address,  s_nationkey AS s_nationkey, s_phone AS s_phone, s_acctbal AS s_acctbal, s_comment AS s_comment
    FROM PS JOIN S ON ps_suppkey = s_suppkey AND ps_partkey = s_suppkey
    JOIN N ON s_nationkey = n_nationkey
            JOIN RF ON n_regionkey = r_regionkey;   

Then I get a message:

JOIN J_PS2 ps_partkey s_suppkey
Couldn't find column ps_partkey

Regards, Alexey

antonmks commented 11 years ago

Fixed !