Re: Two problems recently reported in Flink

2019-03-08 Thread Haisheng Yuan
Hi Fabian, You mentioned: > > > Another problem are join predicates in the ON clause that reference the> > > > inner and outer table. I don’t figure out why this is a problem. Even the join predicate references both inner and outer relation, pushing the filter down to inner side still can work,

[jira] [Created] (CALCITE-2904) Column not found in table when query contain duplicate table alias

2019-03-08 Thread Haisheng Yuan (JIRA)
Haisheng Yuan created CALCITE-2904: -- Summary: Column not found in table when query contain duplicate table alias Key: CALCITE-2904 URL: https://issues.apache.org/jira/browse/CALCITE-2904 Project:

[jira] [Created] (CALCITE-2903) Exception thrown when decorrelating streaming query

2019-03-08 Thread Haisheng Yuan (JIRA)
Haisheng Yuan created CALCITE-2903: -- Summary: Exception thrown when decorrelating streaming query Key: CALCITE-2903 URL: https://issues.apache.org/jira/browse/CALCITE-2903 Project: Calcite

Re: Calcite-RelNode clarifications

2019-03-08 Thread Chris Baynes
For oracle you probably want to generate something like SELECT * FROM "hr"."emp" WHERE "HIRE_DATE" = TRUNC(CURRENT_TIMESTAMP + INTERVAL '2' HOUR, 'SECOND') I believe the `+ INTERVAL '2' HOUR` syntax is supported by calcite. So if you manage to construct it with the builder it should be pushed

Calcite-Master - Build # 1067 - Still Failing

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

Calcite-Master - Build # 1066 - Still Failing

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

[jira] [Created] (CALCITE-2902) Improve performance of AbstractRelNode#computeDigest

2019-03-08 Thread Stamatis Zampetakis (JIRA)
Stamatis Zampetakis created CALCITE-2902: Summary: Improve performance of AbstractRelNode#computeDigest Key: CALCITE-2902 URL: https://issues.apache.org/jira/browse/CALCITE-2902 Project:

Re: Calcite-RelNode clarifications

2019-03-08 Thread Hongze Zhang
If the function TIMESTAMPADD is not supported in Oracle, in general the OracleSqlDialect should translate it to some other expressions or calls. But it seems that currently the dialect does not provide the translation[1]. It would be great if you can log a JIRA case to describe your issue, or

Re: Re[2]: Calcite-RelNode clarifications

2019-03-08 Thread Rakesh Nair
Hello Hongze, Thanks for responding. Your suggestion worked splendidly. I've got one more clarification if its not too much trouble. The following RelNode: *RelDataType any = builder.getTypeFactory().createSqlType(SqlTypeName.ANY);* *ImmutableList constExps =

Re[2]: Calcite-RelNode clarifications

2019-03-08 Thread Hongze Zhang
Hi RamKrishna, As you said: > So, basically I need to add 2 Hours to CurrentTime. I think the generated function call "TIMESTAMPADD(HOUR, 2, CURRENT_TIMESTAMP)" already did that. If what you want is to compare it's value with a MySQL's Date (with format -xx-xx), based on Christopher's

Re: Calcite-RelNode clarifications

2019-03-08 Thread Rakesh Nair
Hello Mr. Baynes, Thanks for responding. 1. Luckily I was able to solve it on my own, thanks anyway. Moving on.. 2. Let me explain my scenario in detail, you see we have an application that queries multiple dbs like Mysql, Oracle, etc..with some static queries which we are maintaining in their