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

2020-03-17 Thread Danny Chan
I’m a little worried about it the default RexExecutorImpl can handle all the downstream projects expressions, and very probably not, there would be some Janino compile exception if it can not translate the RexNodes correctly. So strictly to say, change the RexExecutor to a default

Re: TableModify does not keep UPSERT keyword

2020-03-17 Thread Julian Hyde
I don't think there's a significant difference between the UPSERT and MERGE. The differences are in marketing (which keyword to use) and in technical details (e.g. concurrency semantics). Not worth splitting a core concept over. We spend a lot of effort keeping like-things-like. On Tue, Mar 17,

Calcite-Master - Build # 1650 - Still Failing

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

[jira] [Created] (CALCITE-3863) Truncate return type inference through rel data type factory

2020-03-17 Thread Praveen Kumar (Jira)
Praveen Kumar created CALCITE-3863: -- Summary: Truncate return type inference through rel data type factory Key: CALCITE-3863 URL: https://issues.apache.org/jira/browse/CALCITE-3863 Project: Calcite

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

2020-03-17 Thread Stamatis Zampetakis
I don't know what others think but +1 from my side. Best, Stamatis On Tue, Mar 17, 2020 at 9:16 AM JiaTao Tao wrote: > Hi Danny > > Thanks for your reply, I think Stamatis Zampetakis's opinion is summative, > and here the problem I think is a default RexExecutor is better than null, >

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

2020-03-17 Thread JiaTao Tao
Hi Danny Thanks for your reply, I think Stamatis Zampetakis's opinion is summative, and here the problem I think is a default RexExecutor is better than null, especially, in this case, cuz `reduceExpressionsInternal` and `reduceExpressions` is in the same path, thought the use of RexExecutor may

Re: TableModify does not keep UPSERT keyword

2020-03-17 Thread Christian Beikov
AFAIK MERGE has different concurrency semantics than what some DBMS call UPSERT. PostgreSQL for example has a guaranteed insert or update semantics whereas MERGE could end with constraint violation errors: https://wiki.postgresql.org/wiki/UPSERT Maybe it's worth adding that to the relational

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

2020-03-17 Thread JiaTao Tao
Hi Stamatis Zampetakis I agree with this completely: "The API of RexExecutor says the following "If an expression cannot be reduced, writes the original expression..." so we don't break anything by providing a default one." Regards! Aron Tao Stamatis Zampetakis 于2020年3月16日周一 下午9:52写道: >

Re: TableModify does not keep UPSERT keyword

2020-03-17 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