Re: Cosette / Apache Calcite

2017-09-21 Thread Shumo Chu
Thanks, Michael! We would like to try using Cosette to check the Calcite test cases in your link. Can you send us a pointer to the tool that converts Calcite query plans to SQL? Also, where is the schema for the test cases? Our plan is to call the tool to generate SQL from query plans, and then pa

Give me an example about how can I define the optimization rule of sql

2017-09-21 Thread chen...@keymobile.com.cn
Hello, I first use calcite.I want to user calcite to optimization my sql.Can give me a example step by step to make me know how can i user it to optimiz sql. thanks. 以人为本,与人为善,携手共赢! Chasel Cheng (程泽) | BI Dept ,GZ| Keymobile Software | Qq:384389076 | Mobile:13631438016 | Add:Rm.403A

Re: Give me an example about how can I define the optimization rule of sql

2017-09-21 Thread Zhiqiang He

RE: Give me an example about how can I define the optimization rule of sql

2017-09-21 Thread zhiqiang
You can see RelToSqlConverterTest.java. there is some test case used optimizer rules. -Original Message- From: chen...@keymobile.com.cn [mailto:chen...@keymobile.com.cn] Sent: Thursday, September 21, 2017 3:33 PM To: dev Subject: Give me an example about how can I define the optimizatio

[jira] [Created] (CALCITE-1990) Make RelDistribution to extends RelMultipleTrait

2017-09-21 Thread Rheet Wong (JIRA)
Rheet Wong created CALCITE-1990: --- Summary: Make RelDistribution to extends RelMultipleTrait Key: CALCITE-1990 URL: https://issues.apache.org/jira/browse/CALCITE-1990 Project: Calcite Issue Type

Re: Cosette / Apache Calcite

2017-09-21 Thread Michael Mior
There's is not a *tool* for conversion per-se, but org.apache.calcite.rel.rel2sql.RelToSqlConverter provides an easy interface which takes a RelNode (Calcite's description of a plan) as input and produces SQL as output. The schema for the test cases is defined programmatically in the init method o

Re: Cosette / Apache Calcite

2017-09-21 Thread Amogh Margoor
>>> There might be applications in materialized views. A query Q can use a materialized view V if V covers Q. In other words if >>>Q == R(V) where R is some sequence of relational operators. Given Q and V, Cosette could perhaps analyze and either >>>return R (success) or return that V does not cove