zhouqingqing / qpmodel

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

fix count star related issues #222

Closed pkommoju closed 4 years ago

pkommoju commented 4 years ago

COUNT(*) has tableRefs now to push it to the correct side in join queries.

Bind is forgiving. Calling bind() more than once is a no-op, this change was required to deal with the fact that group by and order by replace the column by select list column and this is already taken into account in group/order binding but only for one level. If order by (abs(-col)) is the expression col would be found to be bound and an assert would go off. This change avoid this problem.