Re: How to parse sql of DDL

2020-11-03 Thread Fan Liya
Hi Xiao, I am not sure if we support "alter table ... add column ... after ..." statement, as some databases do not support this syntax. We do support "alter table ... add column ..." statement. An example can be found in MultiJdbcSchemaJoinTest#testSchemaConsistency, which may be helpful. Best,

Re: How to parse sql of DDL

2020-11-03 Thread xiao cai
Hi Liya: Thanks for your suggestion! Here is the demo i ran using SqlParser: -- String sql = "ALTER TABLE `test`.`mysql_sink_test_1` ADD COLUMN `col_for_test` varchar(255) NULL AFTER `col_binary_1`; SqlParser.Config mysqlConfig =

Re: How to parse sql of DDL

2020-11-03 Thread Fan Liya
Hi Xiao, It's hard to diagnose the problem without seeing your code. My suggestion is that you can debug some test cases in our code base (related to SqlParser), and check how it works. Best, Liya Fan On Wed, Nov 4, 2020 at 10:34 AM xiao cai wrote: > Hi > I just want to konw how to parse the

How to parse sql of DDL

2020-11-03 Thread xiao cai
Hi I just want to konw how to parse the sql statement of DDL. I had use SqlParser to do this, but it was failed. Is someone can help me , thank you very mush. Best xiao.

Re: A question regarding querying Google Cloud BigTable or Spanner through Apache Calcite

2020-11-03 Thread Slim Bouguerra
H Jason, Calcite is a great Logical optimizer Framework that can be used to do very sophisticated data federation and query rewriting. But I don't think you want to use Calcite as it is to perform the physical join between 2 big data systems. To put it simply If you are using Calcite you need to

[jira] [Created] (CALCITE-4376) Materialized view recognition fails when target output different column sequence with GROUP BY

2020-11-03 Thread Wang Yanlin (Jira)
Wang Yanlin created CALCITE-4376: Summary: Materialized view recognition fails when target output different column sequence with GROUP BY Key: CALCITE-4376 URL: https://issues.apache.org/jira/browse/CALCITE-4376

Re: Questions about `order by column`

2020-11-03 Thread Haisheng Yuan
> If `order by` is > not pushed down to the underlying database, then how does Calcite handle > this operator? It will generate a plan with sort operator on top of the data source. > Will it read all data provided by the underlying database > and enumerate it to sort? I believe so. > If so,

Re: A question regarding querying Google Cloud BigTable or Spanner through Apache Calcite

2020-11-03 Thread Haisheng Yuan
Hi Jason, Absolutely it is. On 2020/11/03 20:53:08, Jason Chen wrote: > Hey, > > I am Jason Chen from Shopify Data Science and Engineering team. I have a few > questions regarding the Apache Calcite, and I am not sure if the Apache > Calcite fits our use cases. Feel free to point me to the

Re: Search/Sarg: untested feature merged to the default branch

2020-11-03 Thread Julian Hyde
It's going to be difficult to find time to do this. I would appreciate some help. Julian On Sun, Nov 1, 2020 at 11:46 PM Vladimir Sitnikov wrote: > > Hey Julian, thank you for rolling search/sarg expression. I believe it is a > valuable feature. > > Unfortunately, the new feature causes

Questions about `order by column`

2020-11-03 Thread Xiangwei Wei
Hi all, I'd like to ask some questions about the Calcite adapter. If `order by` is not pushed down to the underlying database, then how does Calcite handle this operator? Will it read all data provided by the underlying database and enumerate it to sort? If so, how to guarantee the performance

A question regarding querying Google Cloud BigTable or Spanner through Apache Calcite

2020-11-03 Thread Jason Chen
Hey, I am Jason Chen from Shopify Data Science and Engineering team. I have a few questions regarding the Apache Calcite, and I am not sure if the Apache Calcite fits our use cases. Feel free to point me to the correct email or Slack channel if this email is not the correct one for asking

[jira] [Created] (CALCITE-4375) merge join condition that has "OR" as much as possible

2020-11-03 Thread Jiatao Tao (Jira)
Jiatao Tao created CALCITE-4375: --- Summary: merge join condition that has "OR" as much as possible Key: CALCITE-4375 URL: https://issues.apache.org/jira/browse/CALCITE-4375 Project: Calcite

[jira] [Created] (CALCITE-4374) Support materialized view recognition when query distinct aggregate on target GROUP BY column

2020-11-03 Thread Wang Yanlin (Jira)
Wang Yanlin created CALCITE-4374: Summary: Support materialized view recognition when query distinct aggregate on target GROUP BY column Key: CALCITE-4374 URL: https://issues.apache.org/jira/browse/CALCITE-4374