qpmodel icon indicating copy to clipboard operation
qpmodel copied to clipboard

codegen todo items

Open zhouqingqing opened this issue 4 years ago • 5 comments

  1. not all operators are implemented
  2. research an inter-op implementation framework to support half codegen and half interpreted plan (Expr already support it)
  3. ~~Row copy avoidance: a major source is join where we merge two rows into one. This can be avoided if we allow two rows interface but could complicate code much~~ (removed as it is not a simple codegen issue).

Research items:

  1. CodeGen still template based, which is difficult to maintain (though better than llvm). LMS is not limited to Scala, Python also have one (https://github.com/jmd1011/snek-LMS) - is it possible to do similar for C/C++ to make codegen easier?

zhouqingqing avatar May 23 '20 04:05 zhouqingqing

@zhouruiapple you can start with more PhysicNode coverage.

zhouqingqing avatar Aug 04 '20 15:08 zhouqingqing

@zhouqingqing got it.

zhouruiapple avatar Aug 06 '20 08:08 zhouruiapple

@zhouqingqing We usually express logical plans in relational algebra to analyse sql semantics. But we express logical plans in the following way. {Agg(filter((a Inner (c Inner b))): a.a1[0]>b.b1[0] and a.a2[1]>c.c2[1])} Is there any guidance or reference to help me understand the above expression? Looks like recursive descent analysis as syntax parsing. But I want to understand the theory of logic plan.

zhouruiapple avatar Aug 10 '20 09:08 zhouruiapple

But we express logical plans in the following way

Where did you get this? Is this some ToString() output? ToString() is a simplified output of actual plan.

See how we construct a plan at : https://github.com/zhouqingqing/qpmodel/blob/master/qpmodel/Plan.cs::CreateSinglePlan().

zhouqingqing avatar Aug 10 '20 16:08 zhouqingqing

@zhouqingqing So this is just ToString() output in LISP format. OK, I understand, thanks.

zhouruiapple avatar Aug 11 '20 02:08 zhouruiapple