Re: TableModify does not keep UPSERT keyword

2020-03-16 Thread Enrico Olivelli
Il Lun 16 Mar 2020, 23:55 Julian Hyde ha scritto: > Change the unparse operation for the dialect so that you generate UPSERT > rather than MERGE. > > IIRC we did this for another dialect - maybe Phoenix. > Julian, In my case (HerdDB) I need to see the presence of UPSERT in the RelNode (Enumerabl

Calcite-Master - Build # 1649 - Failure

2020-03-16 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #1649) Status: Failure Check console output at https://builds.apache.org/job/Calcite-Master/1649/ to view the results.

Re: TableModify does not keep UPSERT keyword

2020-03-16 Thread Julian Hyde
Change the unparse operation for the dialect so that you generate UPSERT rather than MERGE. IIRC we did this for another dialect - maybe Phoenix. Julian > On Mar 16, 2020, at 1:22 AM, Enrico Olivelli wrote: > > Il Lun 16 Mar 2020, 09:06 Stamatis Zampetakis ha > scritto: > >> Hi Enrico, >

Re: [DISCUSS] get RexExecutor from RexSimplify in method reduceExpressionsInternal

2020-03-16 Thread Stamatis Zampetakis
Interestingly, I was looking at this same piece of code not so long ago and I agree it is a bit confusing. Looking around the places that we obtain a RexExecutor, most often (always?) we observe the following pattern: RexExecutor executor = Util.first(query.getCluster().getPlanner().getExecutor()

Re: [DISCUSS] get RexExecutor from RexSimplify in method reduceExpressionsInternal

2020-03-16 Thread Danny Chan
Thanks, the code is a little mess, here is how I understand it: The executor from `final RexExecutor executor =  Util.first(cluster.getPlanner().getExecutor(), RexUtil.EXECUTOR)` is mainly used to construct the RexSimplify, in the RexSimplify, the expression that we evaluate is what we can make

Re: TableModify does not keep UPSERT keyword

2020-03-16 Thread Enrico Olivelli
Il Lun 16 Mar 2020, 09:06 Stamatis Zampetakis ha scritto: > Hi Enrico, > > I have the impression that UPSERT is currently supported only at the parser > level [1] so it seems normal that you don't find something relevant in > LogicalTableModify etc. Note that the SQL standard equivalent is the ME

Re: TableModify does not keep UPSERT keyword

2020-03-16 Thread Stamatis Zampetakis
Hi Enrico, I have the impression that UPSERT is currently supported only at the parser level [1] so it seems normal that you don't find something relevant in LogicalTableModify etc. Note that the SQL standard equivalent is the MERGE statement [2] but this also seems to be supported only at the par

[DISCUSS] get RexExecutor from RexSimplify in method reduceExpressionsInternal

2020-03-16 Thread JiaTao Tao
In method reduceExpressionsInternal, we get RexExecutor from cluster, it can be null: [image: image.png] But in the outside(reduceExpressions), `final RexExecutor executor = Util.first(cluster.getPlanner().getExecutor(), RexUtil.EXECUTOR)`, it can't be null. And reduceExpressions is the only cal