araddon/qlbridge

sql.Rewrite refactor

araddon opened this issue · 1 comments

Complete re-write of the sql.ReWrite() which is crap code.

Goals:

  • Allow sql.ReWrite to support push-down to different data sources when using multi-source queries (joins, select where in, etc).
  • Allow poly-fill missing feautures (ie, group-by in cassandra) but support partial push-down.
  • Allow function re-write (ie, postgres, mysql, etc have different names for the same functions). Allow a dialect-writer to support function re-write.

plan

  • much better unit tests on the sql-rewrite, and more component oriented
  • allow function or node-level rewrite for different dialects