What does SqlSimpleParser.Query#purgeXXX do ?

2019-11-05 Thread 曲修成
Hi All: When I use the org.apache.calcite.sql.advise.SqlSimpleParser.Query#simplify ,have a problem: input sql: select id,name from emp but,output sql select * from emp Because org.apache.calcite.sql.advise.SqlSimpleParser.Query#purgeSelect,purge Select There are many methods like purgeXXX

Re: Re: Re: Problem with converters and possibly rule matching

2019-11-05 Thread Haisheng Yuan
Hi Vladimir, The code in PHYSICAL convention L44 looks weird, I think it always returns true. https://github.com/devozerov/calcite-optimizer/blob/master/src/main/java/devozerov/HazelcastConventions.java#L44 Try this: fromTraits.containsIfApplicable(Convention.PHYSICAL) &&

Re: [DISCUSS] Towards Avatica 1.16.0

2019-11-05 Thread Francis Chuang
I just wanted to follow up on the Avatica 1.16.0 release as I think it would be nice to get it out in the next couple of weeks. Can someone please review the follow if they have got spare cycles? - CALCITE-3401 https://github.com/apache/calcite-avatica/pull/115 - CALCITE-

Re: Re: [DISCUSS] On-demand traitset request

2019-11-05 Thread Jinfeng Ni
@Haisheng, @Xiening, Thanks for pointing that previous email out. Overall, I agree that the physical trait enforcement should be done in the engine, not in the rule. For the rule, it should only specify the request, and the corresponding transformation, and let the engine to explore the search

Re: Geofunction

2019-11-05 Thread Julian Hyde
I’m surprised we don’t support INTEGER to DECIMAL, since it is lossless (unlike, say, converting from INTEGER to REAL). Though I don’t recall what the SQL standard says about that conversion. It is reasonable to be able to call the GIS functions with integer arguments. Julian > On Nov 5,

[avatica] STRUCT type information missing in type name

2019-11-05 Thread Alessandro Solimando
Hello, I noticed that type information inside the "name" field into "ColumnMetaData" are dropped for the inner components of STRUCT, while they are preserved for MULTISET, ARRAY, LIST, MAP. For example the following "RelRecordType": > RecordType( > INTEGER f_int, > INTEGER NOT NULL ARRAY

[jira] [Created] (CALCITE-3477) Geofunction do not support int type as input

2019-11-05 Thread Kirils Mensikovs (Jira)
Kirils Mensikovs created CALCITE-3477: - Summary: Geofunction do not support int type as input Key: CALCITE-3477 URL: https://issues.apache.org/jira/browse/CALCITE-3477 Project: Calcite

Re: [DISCUSS] Proposal to add API to force rules matching specific rels

2019-11-05 Thread Vladimir Ozerov
Hi Xiening, I read the thread about on-demand trait requests. It seems pretty similar to what I am trying to achieve, as it facilitates the bottom-up propagation of physical traits. In fact, both your and my strategy propagate traits bottom-up, but I do this through rules, which also fire

Re: Re: Problem with converters and possibly rule matching

2019-11-05 Thread Vladimir Ozerov
Hi Haisheng, think I already tried something very similar to what you explained, but it gave not an optimal plan. Please let me describe what I did. I would appreciate your feedback. 1) We start with a simple operator tree Root <- Project <- Scan, where the root is a final aggregator in the