As I said in 
http://mail-archives.apache.org/mod_mbox/calcite-dev/201502.mbox/%3CAD859A7F-5F9E-4998-A749-7216674A8EA7%40hydromatic.net%3E
 the best approach is not to work on the AST (SqlSelect) but instead work on 
the algebra (RelNode) using planner rules.

Julian

> On Nov 27, 2015, at 5:45 AM, Sameh Samra <[email protected]> wrote:
> 
> Hi,
> Calcite parser parses select statement to SqlSelect class which gives
> ability to set (selectList/ from/ where) clauses. While I was looking for
> examples I found this message (Parsing SQL) by Renato MarroquĂ­n Mogrovejo
> in February 2015 archive
> <http://mail-archives.apache.org/mod_mbox/calcite-dev/201502.mbox/browser>.
> Moreover, your reply was there are multiple ways to modify sql after
> parsing.
> 
> Actually, I want to edit sql queries by:
>  1- adding some conditions in where clause.
>  2- adding a table to from clause.
> 
> Our queries have some little bit complication; that means nested,
> sub-queries and union. Further, we want to add the modifications in a
> certain parts.
> 
> Are there other methods better than using SqlSelect class?
> 
> Thank you in advance
> SSamra

Reply via email to