Re: Assigning jira issue

2019-08-11 Thread XING JIN
Thanks a lot ~ Francis Francis Chuang 于2019年8月9日周五 上午11:13写道: > Hi Xing Jin, > > I've added you to the contributor role. > > Francis > > On 9/08/2019 12:52 pm, XING JIN wrote: > > Hi Francis, > > I have the same request with Sahith. > > Could you please

Re: Match Converter Rule based on Child Nodes

2019-08-22 Thread XING JIN
I guess in Rahul's case, the child node of join should be converted first, thus physical properties will be appended. But RelNode doesn't have a reference to parent, thus an independent RelOptRule is needed to convert LogicalJoin. Just as Michael said, you need to override the method of

Re: Mapping arithmetic '+' operator with Date and Timestamp operands to target dialect functions

2019-08-26 Thread XING JIN
I guess in your approach, you need to maintain a customized `SqlImplementor` ? How about add a RelOptRule and detect pattern of "date + interval '1' DAY" and use a RexShuttle to convert to "target_func(date, interval '1' DAY)" Thus only a RelOptRule needs to be maintained. Sachin Rohaj

Re: Match Converter Rule based on Child Nodes

2019-08-26 Thread XING JIN
up in "Not enough rules to find the Cheapest Plan". > > Regards, > Rahul > > On Fri, Aug 23, 2019 at 8:17 AM XING JIN wrote: > > > If I understand correctly, you can try below steps: > > 1. Create a rule of Converter to convert child nodes to append extern

Re: Match Converter Rule based on Child Nodes

2019-08-22 Thread XING JIN
ted), the rule cannot be applied. So, we > end up in "Not enough Rules to find the Cheapest Plan". > Is there a way to convert the Child nodes before the parent? > Can VolcanoPlanner be configured to work in bottom-up fashion? > > Regards, > Rahul > > On Thu, Aug 22, 20

Re: Is it possible to retrieve materialized view query rewrite from Calcite Plan

2019-09-16 Thread XING JIN
arge tables. I was wondering if I would have to write my own > Factory classes and implementations for my use case or is there something > already present. > > [1] > > > https://github.com/apache/calcite/blob/73023148e7f37d494f6caf92b01b090f6dde13cd/core/src/main/java/org/apache/calcite/pr

Re: [ANNOUNCE] New committer: Muhammad Gelbana

2019-09-17 Thread XING JIN
Congrats, Muhammad ! 王炎林 <1989yanlinw...@163.com> 于2019年9月18日周三 上午10:38写道: > Congratulations, Muhammad! > > > Best, > Yanlin > > > > > > > At 2019-09-18 05:58:53, "Francis Chuang" wrote: > >Apache Calcite's Project Management Committee (PMC) has invited Muhammad > >Gelbana to become a

Re: Re: [ANNOUNCE] New committer: Julian Feinauer

2019-09-17 Thread XING JIN
Congrats, Julian ! You are well deserved ~ Haisheng Yuan 于2019年9月18日周三 上午10:38写道: > Congrats, Julian! > > - Haisheng > > -- > 发件人:Chunwei Lei > 日 期:2019年09月18日 10:30:31 > 收件人: > 主 题:Re: [ANNOUNCE] New committer: Julian Feinauer > >

Re: Is it possible to retrieve materialized view query rewrite from Calcite Plan

2019-09-16 Thread XING JIN
Hi, Shubham Kumar If I understand correctly, you want get the optimized(by materialized view) SQL String. I wrote a simple test as below, please check if it's helpful for you. @Test public void testDEV() { final String m = "select \"deptno\", \"empid\", \"name\"" + "from \"emps\" where

[DISCUSS] Refinement for Substitution-Based MV Matching

2019-09-16 Thread XING JIN
Hi Contributors, I'm writing this email and hope to start a discussion about https://issues.apache.org/jira/browse/CALCITE-3334 . The approach of substitution-based materialized view matching is effective for its simplicity and extensibility. But now and then we confront materialization matching

Re: [DISCUSS] Refinement for Substitution-Based MV Matching

2019-09-16 Thread XING JIN
Thanks a lot Danny and Haisheng for comments on the doc ~ And more comments are welcome ~ Best, Jin XING JIN 于2019年9月16日周一 下午9:17写道: > Hi Contributors, > > I'm writing this email and hope to start a discussion about > https://issues.apache.org/jira/browse/CALCITE-3334 . >

Re: Assigning jira issue

2019-08-08 Thread XING JIN
Hi Francis, I have the same request with Sahith. Could you please add me to the contributor list as well ? My user name is -- jin xing Thanks a lot ! Francis Chuang 于2019年8月9日周五 上午5:58写道: > Hey Sahith, > > I've added you to the contributor role and assigned the issue to you. > > Francis > > On

Re: How to get columnName as `COUNT(*)` , not `EXPR$0`

2019-09-28 Thread XING JIN
lculate expression > without alias, parsing expression, i.e, `EXPR$0` will be returned? > > > Juan Pan > > > panj...@apache.org > Juan Pan(Trista), Apache ShardingSphere > > > On 09/29/2019 13:16,XING JIN wrote: > If no column name given explicitly, e.g. by alia

Re: How to get columnName as `COUNT(*)` , not `EXPR$0`

2019-09-28 Thread XING JIN
ame from SQL, is it right? > > > Juan Pan > > > panj...@apache.org > Juan Pan(Trista), Apache ShardingSphere > > > On 09/29/2019 12:21,XING JIN wrote: > You can try to give an alias for the selected column. > > Juan Pan 于2019年9月29日周日 上午11:39写道: > > > &

Re: How to get columnName as `COUNT(*)` , not `EXPR$0`

2019-09-29 Thread XING JIN
n > > > panj...@apache.org > Juan Pan(Trista), Apache ShardingSphere > > > On 09/29/2019 13:58,XING JIN wrote: > You can check the below doc of SqlValidatorUtil#getAlias for explanation: > > /** > * Derives an alias for a node, and invents a mangled identifier if

Re: Trivial query simplification

2019-09-24 Thread XING JIN
"v = 1 and v is null" cannot be simplified to "v = 1" not matter v is nullable or not nullable If you really mean that "v is not null", I made below test case in RelOptRulesTest.java for illustration: // mgr is nullable @Test public void testDEV() throws Exception { HepProgram program =

Re: How to get columnName as `COUNT(*)` , not `EXPR$0`

2019-09-28 Thread XING JIN
You can try to give an alias for the selected column. Juan Pan 于2019年9月29日周日 上午11:39写道: > > > Hi everyone, > > > I executed SQL `select count(*) from tb1` through Calcite and > resultSet.getMetaData().getColumnName(i) in my project. But the result is > `EXPR$0` not `COUNT(*)`. > > > Is there

Re: Question about Interpreter and Corelations

2019-11-08 Thread XING JIN
You may modify your sql and operator Collect should not reference correlate variables. XING JIN 于2019年11月9日周六 下午12:32写道: > Currently RelDecorrelator doesn't support a decorrelateRel(Collect), > that's why decorrelate failed > > Zoltan Farkas 于2019年11月9日周六 上午5:46写道: >

Re: Question about Interpreter and Corelations

2019-11-08 Thread XING JIN
Currently RelDecorrelator doesn't support a decorrelateRel(Collect), that's why decorrelate failed Zoltan Farkas 于2019年11月9日周六 上午5:46写道: > Done: https://issues.apache.org/jira/browse/CALCITE-3488 < > https://issues.apache.org/jira/browse/CALCITE-3488> > let me know if you need any more info. >

Re: [ANNOUNCE] Danny Chan joins Calcite PMC

2019-10-30 Thread XING JIN
Congratulations ! Danny ~ OpenInx 于2019年10月31日周四 上午9:33写道: > Congrats, Danny! Well deserve. > > On Thu, Oct 31, 2019 at 9:22 AM Leonard Xu wrote: > > > Congratulation! Danny > > > > > > > On 2019年10月31日, at 上午9:06, Andrei Sereda wrote: > > > > > > Congrats, Danny! > > > > > > On Wed, Oct 30,

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

2019-11-08 Thread XING JIN
Hi Haisheng, Thanks a lot for sharing this great proposal ~ For short I understand your idea as below: 1. Derive the distributions/collations that children COULD/MIGHT offer 2. Decide the best distributions/collations by first point and computing logic of operator, say gropuings in Aggregate; It

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

2019-11-08 Thread XING JIN
Hi Vladimir, I think the way PlannerTests#GoodSingleRule and EnumerableXXXRule work may help you ~ They work by a top-down fashion, but when matching parent, they convert the children explicitly. You may try below steps: 1. Construct a rule LogicalParentRule to match the LogicalParent without

CI passed error tests

2019-12-12 Thread XING JIN
Hi guys, I made a PR and run continuous integration tests. [1] A error test contained in the PR and tagged with @slowTest. The tests should be failed but CI passed by mistake. I doubt our current CI is not running with 'testSlow' configuration. Isn't it ? I'm not sure if I should create a JIRA.

Re: CI passed error tests

2019-12-13 Thread XING JIN
ps://github.com/apache/calcite/pull/1651 > > > Le ven. 13 déc. 2019 à 08:41, XING JIN a écrit : > > > Hi guys, > > I made a PR and run continuous integration tests. [1] > > A error test contained in the PR and tagged with @slowTest. > > The tests should be

Re: CI passed error tests

2019-12-13 Thread XING JIN
s yes! > > Best, > Stamatis > > On Fri, Dec 13, 2019 at 4:52 PM XING JIN wrote: > > > Thanks a lot Ruben ~ > > I'm working on "[CALCITE-3478] Restructure tests for materialized views" > ( > > https://github.com/apache/calcite/pull/1560) , which cont

Re: Problems to validate ddl commands

2019-12-16 Thread XING JIN
Hi Anthony ~ Calcite supports to validate DDL; I cannot open your link, would you please give some details for your problem ? Best, Jin Anthony Louis 于2019年12月17日周二 上午4:08写道: > When I try to validate a sql statement that contains "CREATE TABLE" it > throws an error that is described in this

Re: [DISCUSS] Tests vs multiline strings

2019-12-15 Thread XING JIN
Before coming to Calcite, I works quite some time on Scala. The code style shares some similarities with Kotlin -- It's much simple and easier to read when you write a test. But we should think twice whether to bring in another language. To answer Haisheng's question: Because default lex config is

Re: [DISCUSSION] Extension of Metadata Query

2019-10-18 Thread XING JIN
ll useful and shouldn’t be removed. > > > > > > > > > For your second point, I think you would still need a way to keep > > > RelMetadataQuery object during a rule call. If you choose to create new > > > instance, you will have to pass it around while apply

Re: [DISCUSS] State of the project 2019

2019-10-24 Thread XING JIN
Thanks a lot for your work Francis and +1 for Stamatis to be the next PMC chair ~ ~ Calcite is a great project and it offers as a strong SQL engine to help users to build data systems. My group uses Calcite to accelerate SQLs from multiple data engines by heuristic based, cost based and

Re: [DISCUSSION] Extension of Metadata Query

2019-10-17 Thread XING JIN
BTW, I think one JIRA number discussed in the thread would be https://issues.apache.org/jira/browse/CALCITE-2855 not CALCITE-2885 Best, Jin XING JIN 于2019年10月17日周四 下午3:49写道: > 1. RelMetadataQuery covers the functionality of MetadataFactory, why > should we keep/maintain both of them ? sh

Re: [DISCUSSION] Extension of Metadata Query

2019-10-17 Thread XING JIN
1. RelMetadataQuery covers the functionality of MetadataFactory, why should we keep/maintain both of them ? shall we just deprecate MetadataFactory. I see MetadataFactory is rarely used in current code. Also I think MetadataFactory is not good place to offering customized metadata, which will make

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-15 Thread XING JIN
lgebraGenerator.getOptimizedRelationalAlgebra(RelationalAlgebraGenerator.java:202) > at > com.blazingdb.calcite.catalog.BlazingRulesTest.generateSQLTest(BlazingRulesTest.java:274) > > Any idea why could this be happening? > > Thank you in advance. > > On 2019/10/12 0

Re: lex parameter does not get taken into account for views

2019-12-01 Thread XING JIN
Filed a JIRA: https://issues.apache.org/jira/browse/CALCITE-3549 Danny Chan 于2019年12月2日周一 上午9:06写道: > Dear Erin ~ > > You are right, Calcite now always hard code the parser config for JDBC > query[1], that means, Lex config for view expanding is not supported yet, > can you log a issue and

Re: [ANNOUNCE] Haisheng Yuan joins Calcite PMC

2019-11-11 Thread XING JIN
Congratulations Haisheng ~ You well deserved ! Kevin Risden 于2019年11月12日周二 上午3:13写道: > Congrats and welcome! > > Kevin Risden > > > On Mon, Nov 11, 2019 at 2:10 PM Chunhui Shi wrote: > > > Congratulations! > > > > On Mon, Nov 11, 2019 at 10:09 AM Jinfeng Ni wrote: > > > > > Congratulations! >

Re: Adding RelOptMaterializations to a planner

2019-10-08 Thread XING JIN
Hi Shubham, In my understanding, same RelOptPlanner is the way to go, as one VolcanoPlanner#registerMaterializations calls RelOptMaterializations#useMaterializedViews and picks the best algebra expression tree. I'd suggest to create all the materializations into a VolcanoPlanner and then

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-11 Thread XING JIN
Filed a JIRA: https://issues.apache.org/jira/browse/CALCITE-3405 Haisheng Yuan 于2019年10月12日周六 上午4:34写道: > Yes, definitely. > > You can go through the project expression with InputFinder to find all the > used columns, create a logical project with those columns, and remap the > top project

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-12 Thread XING JIN
l/RelFieldTrimmer.java > > On Sat, Oct 12, 2019 at 6:06 AM XING JIN wrote: > > > Filed a JIRA: > > https://issues.apache.org/jira/browse/CALCITE-3405 > > > > Haisheng Yuan 于2019年10月12日周六 上午4:34写道: > > > > > Yes, definitely. > > > > > >

Re: Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-12 Thread XING JIN
月12日周六 下午5:56写道: > Can we just use Bindables.BINDABLE_TABLE_SCAN_RULE to translate the > table scan to BindableTableScan ? > > > > -- > > Best, > Wang Yanlin > > > > At 2019-10-12 17:12:20, "XING JIN" wrote: > >Hi Stamatis, &

Re: Re: Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-13 Thread XING JIN
Hi, Stamatis, Danny~ Thanks for explain ~ > "The consumer in the case of P1 is the project which only needs $0, $2, $5, $6 so the trimmer could slim down the scan by projecting only these fields." I think RelFieldTrimmer is already doing this by [1]. But why the final BindableTableScan is not

Re: Re: Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-13 Thread XING JIN
Also regarding that Projects merging is common in Calcite optimization rules, we should always remember to avoid merging for cases like the one given by Rommel. I think that would be hard. Best, Jin XING JIN 于2019年10月14日周一 上午11:51写道: > Hi, Stamatis, Danny~ > > Thanks fo

Re: Re: Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-14 Thread XING JIN
Yes, that's how testPushNonSimpleMappingProject [1] works [1] https://github.com/apache/calcite/pull/1500/files#diff-3c834a32d46b821b5241e132f2ae6bfaR324 Danny Chan 于2019年10月14日周一 下午3:36写道: > > But why the final BindableTableScan is not pruned ? > > The RelFieldTrimmer default is turned off,

Re: Re: Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-14 Thread XING JIN
/Prepare.java#L249 XING JIN 于2019年10月14日周一 下午4:03写道: > Yes, that's how testPushNonSimpleMappingProject [1] works > > [1] > https://github.com/apache/calcite/pull/1500/files#diff-3c834a32d46b821b5241e132f2ae6bfaR324 > > Danny Chan 于2019年10月14日周一 下午3:36写道: > >> > But w

Re: [DISCUSS] Move CalciteAssert and similar "test framework" classes to its own testlib module

2019-12-17 Thread XING JIN
Hi, Vladimir > I suggest we do not publish testlib artifacts to Nexus (who needs > Calcite-related assertions and things like that?) +1 to have the module be published. Some of my users write tests based on functionalities provided from Calcite test framework. Best, Jin Michael Mior

Re: Re: [ANNOUNCE] New Calcite PMC chair: Stamatis Zampetakis

2019-12-18 Thread XING JIN
Congratulations Stamatis! -Jin Chunwei Lei 于2019年12月19日周四 上午10:33写道: > Congratulations Stamatis! > > > Best, > Chunwei > > > On Thu, Dec 19, 2019 at 9:36 AM Danny Chan wrote: > > > Congratulations Stamatis! > > > > Best, > > Danny Chan > > 在 2019年12月19日 +0800 AM7:37,dev@calcite.apache.org,写道:

Re: Cannot parse query that contains colons for casting in postgres sql

2020-01-08 Thread XING JIN
Hi, Rick ~ Babel parser supports casting by double colon [1] [1] https://issues.apache.org/jira/browse/CALCITE-2843 -Jin Rick Liao 于2020年1月9日周四 上午6:05写道: > Hello all, > > I'm trying to parse a postgres sql query that contains :: for casting. The > parser fails when it reaches the colon. I'm

Re: [DISCUSS] CALCITE-3661, CALCITE-3665, MaterializationTest vs HR schema statistics

2020-01-04 Thread XING JIN
Hi, Vladimir ~ In ReflectiveSchema, Statistics of FieldTable is given as UNKNOWN[1][2]. When reading a table's row count, if no statistics given, a default value of 100 will be returned [3] -- this is relatively a bigger value compared with the fields defined in HRFKUKSchema. When a materialized

Re: How to get the used columns (categorized by tables) from a SQL

2020-04-16 Thread XING JIN
You can use SqlValidator.getFieldOrigins for a SqlNode, or use RelMetadataQuery.getColumnOrigins for a RelNode. - Jin Julian Hyde 于2020年4月17日周五 上午7:29写道: > At the RelNode level, you can use RelMetadataQuery.getColumnOrigins. > > But I’m sure that there’s something available at the SqlNode

Re: The Travis CI build failure

2020-04-19 Thread XING JIN
I have force pushed several times, but it keeps failing. Chunwei Lei 于2020年4月20日周一 上午10:49写道: > I am a little confused too. Sometimes the traivs ci build of master fails > when I merge > the pr which passes all tests. > > > > Best, > Chunwei > > > On Mon,

The Travis CI build failure

2020-04-19 Thread XING JIN
In PR https://github.com/apache/calcite/pull/1926 and https://github.com/apache/calcite/pull/1925, The Travis CI build keeps failing with below messages. The exception has nothing to do with the change in PR. There seems to be something wrong with the building environment. ...

Re: How to give type in case of type mismatch while doing union

2020-04-27 Thread XING JIN
Hi, Anjali ~ Are you doing the UNION by Sql ? If so, can you give the Sql content ? Are you doing the UNION on RelNodes ?, If so, you need to do type CAST. Jin Anjali Shrishrimal 于2020年4月27日周一 下午4:25写道: > Hi, > > While doing union of 2 RelNodes with different types, I am getting NPE. (I > am

Re: [ANNOUNCE] New committer: Vineet Garg

2020-04-25 Thread XING JIN
Congrats, Vineet! Best, Jin Fan Liya 于2020年4月26日周日 上午11:45写道: > Congratulations, Vineet! > > Best, > Liya Fan > > On Sun, Apr 26, 2020 at 10:30 AM Aman Sinha wrote: > > > Congratulations Vineet ! > > > > -Aman > > > > On Sat, Apr 25, 2020 at 7:15 PM Feng Zhu wrote: > > > > >

Re: Understanding annotations of SqlGroupingFunction

2020-04-22 Thread XING JIN
Hi Vineet ~ +1 on your analysis. Checking below case in agg.iq. We can see that the behavior of GROUPING function in Calcite is the same as Hive. # GROUPING in SELECT clause of CUBE query select deptno, job, count(*) as c, grouping(deptno) as d, grouping(job) j, grouping(deptno, job) as x from

Re: Understanding annotations of SqlGroupingFunction

2020-04-22 Thread XING JIN
Filed a JIRA: https://issues.apache.org/jira/browse/CALCITE-3950 XING JIN 于2020年4月22日周三 下午2:51写道: > Hi Vineet ~ > +1 on your analysis. > Checking below case in agg.iq. We can see that the behavior of GROUPING > function in Calcite is the same as Hive. > > # GROUPING in SEL

Re: [ANNOUNCE] New committer: Jin Xing

2020-04-30 Thread XING JIN
edia.org/wiki/Ant_Financial> [2] https://calcite.apache.org/docs/powered_by.html <https://calcite.apache.org/docs/powered_by.html#alibaba-maxcompute> XING JIN 于2020年5月1日周五 上午10:54写道: > Thanks a lot, Julian ~ > I'm not from MaxCompute team, but from big data platform in Alibaba Ant &

Re: [ANNOUNCE] New committer: Jin Xing

2020-04-30 Thread XING JIN
-maxcompute> > > > > On Apr 29, 2020, at 5:06 AM, XING JIN wrote: > > > > Thanks a lot ~ > > Calcite is a great project and it's great honor for me to work with you > > guys. I really appreciate the help from community. > > I'm working in Alibaba. My t

Re: [ANNOUNCE] New committer: Jin Xing

2020-04-29 Thread XING JIN
Thanks a lot ~ Calcite is a great project and it's great honor for me to work with you guys. I really appreciate the help from community. I'm working in Alibaba. My team builds big data system to optimize batch and streaming jobs. We use Calcite to process Sql queries and accommodate to different

Re: [VOTE] Release apache-calcite-1.23.0 (release candidate 1)

2020-05-18 Thread XING JIN
Thanks, Haisheng ~ Local Calcite build with tests enabled on Linux: *OK* Calcite-based system test suite: *OK* Vote: +1 (non-binding) Francis Chuang 于2020年5月18日周一 下午2:00写道: > Thanks for making this release available for voting, Haisheng! > > Verified GPG signature - OK > Verified SHA512 - OK

Re: [ANNOUNCE] Apache Calcite 1.23.0 released

2020-05-27 Thread XING JIN
Thanks a lot for driving this, Haisheng! Best, Jin Stamatis Zampetakis 于2020年5月28日周四 上午7:14写道: > Many thanks again Haisheng, the release has your signature on it and it is > in many places :) > > On Wed, May 27, 2020 at 9:34 PM Haisheng Yuan wrote: > > > The Apache Calcite team is pleased to

Re: [ANNOUNCE] Ruben Quesada Lopez joins Calcite PMC

2020-08-11 Thread XING JIN
Congrats, Ruben! 953396112 <953396...@qq.com> 于2020年8月12日周三 上午7:47写道: > Congratulations,Ruben! > > > xzh > --原始邮件-- > 发件人: > "dev" > < >

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-23 Thread XING JIN
Congratulations ~ Best, Jin guangyuan wang 于2021年6月24日周四 上午9:50写道: > Congratulations! > > Francis Chuang 于2021年6月24日周四 上午6:39写道: > > > Congrats, Vladimir! > > > > Francis > > > > On 24/06/2021 7:48 am, Haisheng Yuan wrote: > > > Congratulations and thanks for your contributions, Vladimir! > >

Re: [ANNOUNCE] New committer: Zhaohui Xu

2021-10-15 Thread XING JIN
Congratulations ! Jin Michael Mior 于2021年10月15日周五 上午12:56写道: > Welcome Zhaohui! > -- > Michael Mior > mm...@apache.org > > Le mer. 6 oct. 2021 à 16:48, Stamatis Zampetakis a > écrit : > > > > Apache Calcite's Project Management Committee (PMC) has invited Zhaohui > Xu > > to > > become a

Re: [ANNOUNCE] New committer: Xiong Duan

2021-10-25 Thread XING JIN
Congratulations ! Best, Jin Chunwei Lei 于2021年10月25日周一 下午4:58写道: > Congratulations, Xiong! > > > Best, > Chunwei > > > On Sun, Oct 24, 2021 at 6:34 AM Haisheng Yuan wrote: > > > Congrats, Xiong! > > > > On 2021/10/23 21:23:59, Francis Chuang wrote: > > > Congratulations! > > > > > > On