[jira] [Created] (CALCITE-3112) Support Window in RelToSqlConverter

2019-06-05 Thread Feng Zhu (JIRA)
Feng Zhu created CALCITE-3112: - Summary: Support Window in RelToSqlConverter Key: CALCITE-3112 URL: https://issues.apache.org/jira/browse/CALCITE-3112 Project: Calcite Issue Type: Improvement

Re: Request for contributor permissions

2019-06-05 Thread Francis Chuang
Hi Winifred, I've added you as a contributor to jira. Francis On 6/06/2019 2:38 pm, TANG Wen-hui wrote: Hello, I would like to contribute to Calcite. Could someone assign contributor permissions to me? My JIRA's username is "winipanda" Willing to contribute to Calcite! Thanks, Winifred

Request for contributor permissions

2019-06-05 Thread TANG Wen-hui
Hello, I would like to contribute to Calcite. Could someone assign contributor permissions to me? My JIRA's username is "winipanda" Willing to contribute to Calcite! Thanks, Winifred winifred.wenhui.t...@gmail.com

Re: Question about spark adaptor

2019-06-05 Thread Zhu Feng
Hi, Luso: We are also developing such platform now. As Spark evolves rapidly, the SparkHandler based on low-level RDD API in Calcite is unfriendly and almost unavailable. Instead, you can convert RelNode back to SQL queries, and execute them in Spark or any computation engines. select a.x, b.y

Calcite-Master - Build # 1209 - Failure

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

Re: [DISCUSSION] Extension of Metadata Query

2019-06-05 Thread Yuzhao Chen
In order to add some top-level query interfaces like columnInterval to topK, one way to extend the RelMetadataQuery is “sub-class” it,  but a subclass-instance of RelMetadataQuery can not be set into the RelOptCluster(with a always default singleton RMQ instance), which is a key factor to

Re: [DISCUSS] IS NOT DISTINCT FROM rewrite

2019-06-05 Thread Julian Hyde
I agree. For whoever fixes the JDBC adapter, I discovered this table describing alternative syntax on Oracle, DB2, MySQL: https://modern-sql.com/feature/is-distinct-from#proprietary-alternantives Julian > On Jun

Re: Re: [DISCUSS] IS NOT DISTINCT FROM rewrite

2019-06-05 Thread Haisheng Yuan
> if sending SQL to a database that does not understand IS NOT DISTINCT FROM That is sadly true. I found that Hive just starts to support INDF since 3.0.0. But dy default expanding INDF is still questionable. Their incapability should not force Calcite expand INDF by default. > If both

Re: Type information from SQL parser?

2019-06-05 Thread Muhammad Gelbana
Parsing alone can't get you types. You'll have to validate (let Calcite discover your schemas, tables and columns metadata). A quick look in SqlNode showed no trace of types information (other than the SqlKind enumeration which doesn't seem like what you're looking for). Therefore I believe

Type information from SQL parser?

2019-06-05 Thread Scott McKinney
Hi. I'm reviewing Calcite for a project and I'm having difficulty wading through the API. Roughly, I want the following functionality from the Calcite API: var schema = parseDDL(RAW_DDL); // SQL DDL or any type of Calcite supported schema var query = parseQuery("SELECT c1, c2 FROM t1 WHERE

Re: [DISCUSS] IS NOT DISTINCT FROM rewrite

2019-06-05 Thread Julian Hyde
My instinct is that we should leave it unexpanded. And that we should recognize “equals-like operators”, so that a planner rule originally written for ‘=‘ could easily be expanded to also apply to ‘is not distinct from’. Of course there would be a way of expanding it that we could use if

[DISCUSS] IS NOT DISTINCT FROM rewrite

2019-06-05 Thread Haisheng Yuan
I see INDF is rewritten to OR, and FilterRemoveIsNotDistinctFromRule rewrites INDF to CASE expression. Why do we want to do that? To simplify expression like "a is not distinct from b or a = b"? Then we spend a lot effort to convert OR/CASE back to INDF. I am curious what is the motivation to

Question about spark adaptor

2019-06-05 Thread Luso Clemens
Hi, I'm a system architect work for china merchant bank, I want to use calcite to do some federated queries across different databases and push calculations to spark, so I enable the spark option but get an no pointer exception. I think the problem is I didn't configure the spark

Re: [DISCUSSION] Extension of Metadata Query

2019-06-05 Thread Julian Hyde
By “extend” do you mean “sub-class”? > On Jun 4, 2019, at 10:19 PM, Yuzhao Chen wrote: > > Thanks Julian for your detail reply, > > > 1. I checked the Janino gened-code and the > RelMetadataQuery/RelMetadataProvidor and almost can make sure MetadataQuery > only use the

Support parser PostgreSQL

2019-06-05 Thread Phạm Minh Đức
Dear Dev Team's Apache Calcite, I'm implementing Calcite for parsing PostgreSQL. When parsing an SQL statement, having a config of SqlParser as : SqlParser.Config sqlParserConfig = SqlParser./configBuilder/()   .setParserFactory(SqlDdlParserImpl.*/FACTORY/*)  

Re: Execute multiple RelNodes from single RelNode

2019-06-05 Thread Julian Hyde
Multi-sink is something I’ve wanted to for a while. (I know that hive uses multi-sink plans for insert, but has never been able to model them using Calcite.) We basically need a DAG. The problems are how to model divergent data flows, and how to model the “controller” that waits for all of the

Re: Extracting all columns used in a query

2019-06-05 Thread Rivelli, Adam
Haisheng, Yes, in that case I'd want to extract r1, r3 and s1, s3. I'm doing this to help monitor queries made by others on databases I manage, and potentially remove columns that nobody ever uses in any capacity. It looks like something along the lines of Ivan's code can do this, but with

Re: Execute multiple RelNodes from single RelNode

2019-06-05 Thread Yuzhao Chen
This seems a requests for multi-sink insert. > 3) Calcite transforms it into multiple TableModifies Instead of let Calcite to transform multiple TableModifies, I think you should do it by your self, the send each TableModify to Calcite sqlToRel converter. If you want to insert into multiple

Re: Execute multiple RelNodes from single RelNode

2019-06-05 Thread Ivan Grgurina
Hi Chunwei, the most basic example I can think of is: 1) Application sends one TableModify operation, for example, INSERT. 2) Calcite receives that TableModify 3) Calcite transforms it into multiple TableModifies that transparently (to the application) target multiple distributed tables, or