Re: [DISCUSSION] Extension of Metadata Query

2019-06-11 Thread Yuzhao Chen
bers) I can see that new kinds of metadata might > be difficult to add. > > Julian > > > > On Jun 9, 2019, at 7:54 PM, Yuzhao Chen wrote: > > > > Thanks, Stamatis > > > > You are right, this discussion came up due to CALCITE-2885, it is not about > > the

Master build is failing

2019-06-10 Thread Yuzhao Chen
The master branch is failing continuously, since from CALCITE-2822[1],  but I’m not sure if this commits has relationship with the failure. Siddharth and Stamatis Zampetakis, do you have any ideas ? [1] https://travis-ci.org/apache/calcite/builds/542987336 Best, Danny Chan

Re: [DISCUSSION] Extension of Metadata Query

2019-06-09 Thread Yuzhao Chen
e StringBuilder. RelMetadataQuery > > is in the role of the StringBuilder. In a complex system, it is nice > > to keep some of the components simple, or at least keep them to > > prescribed roles.) > > > > Julian > > > > [1] https://en.wikipedia.org/wiki/Multipl

Re: Parsing DB2 sql statements

2019-06-06 Thread Yuzhao Chen
Another choice is just like you said, you can add Date as UDF but because Date is a reserved word, you may need to quote the function name like `Date`(col1) based on what quoting character you use. Andrew O 于2019年6月6日周四 下午7:07写道: > I'm doing a project trying to parse some IBM DB2 sql

Re: [DISCUSSION] Extension of Metadata Query

2019-06-05 Thread Yuzhao Chen
to limit the extension of RelMetadataQuery. Best, Danny Chan 在 2019年6月5日 +0800 PM11:49,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, > > > > &g

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: [DISCUSSION] Extension of Metadata Query

2019-06-04 Thread Yuzhao Chen
eep some of the components simple, or at least keep them to > prescribed roles.) > > Julian > > [1] https://en.wikipedia.org/wiki/Multiple_dispatch > > On Sun, Jun 2, 2019 at 11:19 PM Yuzhao Chen wrote: > > > > Currently we provide answer to metadata

Re: Correlate Join SemiJoin transformation

2019-06-04 Thread Yuzhao Chen
I think the complexity mostly comes from the value generator, which is the engineering foundation of current decorrelation. Best, Danny Chan 在 2019年6月5日 +0800 AM10:45,Chunwei Lei ,写道: > Thanks for raising this, Haisheng. > > Do you mean that we should have better subquery unnesting? > > > > >

Re: Giving the Calcite logo some love

2019-06-04 Thread Yuzhao Chen
; > > Thanks for digging this out Daniel! > > > > > > > > At this point we have two candidates: > > > > http://humbedooh.com/calcite-proposed.svg > > > > https://svgshare.com/s/86r > > > > > > > > Do we like any of above more than our current logo (the way they are

Re: sql to rule machine learning

2019-06-03 Thread Yuzhao Chen
I have also noticed this project, this grammar is too faraway from SQL standard. But the idea is good, like the CEP grammar. Best, Danny Chan 在 2019年6月3日 +0800 AM10:52,Albert ,写道: > found some efforts in bringing sql to machine learning world. >

[DISCUSSION] Extension of Metadata Query

2019-06-03 Thread Yuzhao Chen
Currently we provide answer to metadata query through RelMetadataProvider [1], there are some sub-classes of it: RelMetadataProvider | |- VolcanoRelMetadataProvider |- ChainedRelMetadataProvider/DefaultRelMetadataProvider |- HepRelMetadataProvider |- CachingRelMetadataProvider |-

Re: Giving the Calcite logo some love

2019-06-02 Thread Yuzhao Chen
Oh, I see a big hammer, thanks Daniel ! Best, Danny Chan 在 2019年6月3日 +0800 AM6:21,Daniel Gruno ,写道: > Found it! > > http://humbedooh.com/calcite-proposed.svg > > Thanks, Wayback Machine! > > On 19/05/2019 10.01, Stamatis Zampetakis wrote: > > Hi all, > > > > We started this discussion about a

Re: Pluggable JDBC types

2019-06-02 Thread Yuzhao Chen
You don’t need to, just define a new type name in parser[1] and translate it to VARCHAR is okey. [1]  https://github.com/apache/calcite/blob/b0e83c469ff57257c1ea621ff943ca76f626a9b7/server/src/main/codegen/config.fmpp#L375 Best, Danny Chan 在 2019年6月3日 +0800 AM6:09,Muhammad Gelbana ,写道: > That I

Re: [DISCUSS] Towards Calcite 1.20.0

2019-05-31 Thread Yuzhao Chen
1.20. Sorry I screwed up, Danny! Let’s discuss in the JIRA case. > > Julian > > [1] https://issues.apache.org/jira/browse/CALCITE-3102 > <https://issues.apache.org/jira/browse/CALCITE-3102> > > > On May 28, 2019, at 5:18 AM, Yuzhao Chen wrote: > > > > Tha

Re: CyclicMetadataException in testPushDownJoinConditionsWithExpandedIsNotDistinctUsingCase

2019-05-29 Thread Yuzhao Chen
Thanks Ruben for your good analysis. What I’m confused is that isn’t the static REL_BUILDER more prone to have concurrency problems ? And the pushed scans(EMP_SCAN and DEPT_SCAN) are all nodes(immutable), how could this be a problem ? Best, Danny Chan 在 2019年5月29日 +0800 PM5:37,Ruben Q L ,写道: >

Re: Support complete implicit type coercion (DISCUSSION)

2019-05-29 Thread Yuzhao Chen
peInference, SqlOperandTypeInference, SqlOperandTypeChecker) have > been very successful, and we should follow that general pattern as we > implement implicit type coercion. > > Julian > > > > On May 26, 2019, at 11:39 PM, Yuzhao Chen wrote: > > > > Thanks for your respons

Re: calcite close connection

2019-05-28 Thread Yuzhao Chen
What do you mean by close the Schema ? Best, Danny Chan 在 2019年5月28日 +0800 AM11:41,dev@calcite.apache.org,写道: > > Schema

Re: [DISCUSS] Towards Calcite 1.20.0

2019-05-28 Thread Yuzhao Chen
Thanks so much for your work, Michael, Let's get CALCITE-3055 into 1.20 version, because  it fix an important function regression. I will merge it in if finishes the review. [1] https://github.com/apache/calcite/pull/1230/files Best, Danny Chan 在 2019年5月28日 +0800 AM1:41,Michael Mior ,写道: >

Re: Support complete implicit type coercion (DISCUSSION)

2019-05-27 Thread Yuzhao Chen
> > Thanks Danny for bringing it up. > > > This is a useful feature, we should push it forward. > > > > > > I went through the design doc, looks good in general. > > > I will also spend some time on the pull request 706. > > &g

Support complete implicit type coercion (DISCUSSION)

2019-05-26 Thread Yuzhao Chen
Hi, guys. The implicit type coercion is almost supported by every production RDBMS(MYSQL[1], ORACLE[2], SQLSERVER[3]), also some Hadoop data warehouse facilitates like HIVE. As a query optimization engine of many comutation engines(like Apache Flink) and some OLAP engines(like Apache Drill),

Re: Elasticsearch Adapter. Dropping support for 2.x and 5.x versions.

2019-05-21 Thread Yuzhao Chen
+1 for only support one valid version. Best, Danny Chan 在 2019年5月22日 +0800 AM6:48,Julian Hyde ,写道: > +1 > > Better to stay current. And it’s inefficient for us to support multiple > versions. > > If people need 2.x or 5.x they can use an older version of Calcite (or roll > their own version of

Re: Has issue when parse DDL file using SqlDdlParserImpl

2019-05-21 Thread Yuzhao Chen
Sorry I only found the grammar template in our site [1] and some simple test demos in ServerParserTest [2]. I think we should support detail doc with demos of all kinds of supported DDLs and DMLs, will fire a JIRA about this. [1] http://calcite.apache.org/docs/reference.html#ddl-extensions [2] 

Re: Giving the Calcite logo some love

2019-05-19 Thread Yuzhao Chen
Sounds great ! Look forward to the new logo ! Best, Danny Chan 在 2019年5月19日 +0800 PM11:25,Daniel Gruno ,写道: > I have them at home (traveling atm), can get to them around June 6th if > need be. > > On 19/05/2019 11.01, Stamatis Zampetakis wrote: > > Hi all, > > > > We started this discussion about

Re: Customizing Join Algorithm

2019-05-16 Thread Yuzhao Chen
It seems that you just need a new convention which integrated with you custom algorithm, you can reference EnumerableJoin [1] for some inspirations. [1] 

Re: [ANNOUNCE] New committer: Danny Chan

2019-05-13 Thread Yuzhao Chen
Thank you everyone for your kind messages. Currently I am working in Alibaba Blink SQL Engine team in Hangzhou, Zhejiang, China. We are developing a production version of Apache Flink. Our team has done many promotions for flink-table module and recently we are merging and contributing our

Re: Using secondary indexes for accessing tables

2019-05-12 Thread Yuzhao Chen
Roman Kondakov, I didn’t look into your use case details, but the secondary indexes may be used mainly for 2 scenarios: 1. Table index scan 2. The dim table join (key look up) Calcite does not support secondary indexes metadata yet, or even (indexes). But I think you can extend it with the

Re: [ANNOUNCE] Apache Calcite Avatica 1.15.0 released

2019-05-12 Thread Yuzhao Chen
Nice job ! Francis, thx for your work. Best, Danny Chan 在 2019年5月13日 +0800 AM9:30,Francis Chuang ,写道: > The Apache Calcite team is pleased to announce the release of Apache > Calcite Avatica 1.15.0. > > Avatica is a framework for building database drivers. Avatica defines a > wire API and

Re: inter-database queries

2019-05-09 Thread Yuzhao Chen
That's great.

Re: Fixing parenthesized joins

2019-05-09 Thread Yuzhao Chen
Set it, good luck ! Best, Danny Chan 在 2019年5月10日 +0800 AM5:21,Muhammad Gelbana ,写道: > I opened a PR to fix CALCITE-35 [1] but I can't set the affected version > (1.19) and component (Babel parser). > > Would someone please set those ? > Or may be grant me the necessary privileges to do so on my

Re: [DISCUSS] Towards Avatica 1.15.0

2019-05-09 Thread Yuzhao Chen
Fired a PR in https://github.com/apache/calcite-avatica/pull/97 Best, Danny Chan 在 2019年5月9日 +0800 PM1:52,Francis Chuang ,写道: > Thanks, Danny! If you can open a PR for it, I'll try to merge it in > today and make 1.15.0-rc0 available for voting. > > Francis > > On 9/05/2019 3:

Re: [DISCUSS] Towards Avatica 1.15.0

2019-05-08 Thread Yuzhao Chen
Squirrel SQL as the client and see if the error messages come > back: > https://issues.apache.org/jira/browse/CALCITE-3040?focusedCommentId=16830674=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16830674 > > On 9/05/2019 1:21 pm, Yuzhao Chen wrote: >

Re: [DISCUSS] Towards Avatica 1.15.0

2019-05-08 Thread Yuzhao Chen
/b7c6de180aa2f9cfa840504012d42c625595161d/core/src/main/java/org/apache/calcite/avatica/AvaticaConnection.java#L559 Best, Danny Chan 在 2019年5月9日 +0800 AM9:34,Francis Chuang ,写道: > Many thanks, Danny! > > On 9/05/2019 11:33 am, Yuzhao Chen wrote: > > Francis, I will help to take this issue. > > > > Best, >

Re: [DISCUSS] Towards Avatica 1.15.0

2019-05-08 Thread Yuzhao Chen
Francis, I will help to take this issue. Best, Danny Chan 在 2019年5月9日 +0800 AM6:33,Francis Chuang ,写道: > According to the issue, it blocks CALCITE-2817 [1], however CALCITE-2817 > was in Calcite 1.19.0, which was released before Avatica 1.14.0. > > I am happy to revert CALCITE-2845 as I am pretty

Reorginize the SqlDialects ? Maybe just a discussion

2019-05-07 Thread Yuzhao Chen
Hi guys, recently there is a issue that want to integrate SqlDialect and SqlParser.Config The background is that there are cases that we both use the SqlDialect and SqlParser.config, but these config items are really a mess and come confused me a lot, so i list them there and to see if we can

Re: Rewriting queries with Calcite

2019-05-07 Thread Yuzhao Chen
You can supply a RuleSet when use Program to promote your logical/physical plan, the RuleSet is totally can be custom. [1]  https://github.com/apache/calcite/blob/9ece70f5dcdb00dbc6712496c51f52c05178d4aa/core/src/main/java/org/apache/calcite/tools/Program.java#L38 Best, Danny Chan 在 2019年5月6日

Re: Difficulties with implementing a table for a custom convention

2019-05-04 Thread Yuzhao Chen
You can set up the target traits to include the convention you want when invoke the Program#run method [1], with the converters as rules of the program. [1] 

Re: Virtual key signing party

2019-05-03 Thread Yuzhao Chen
--- > > > > 发件人:Stamatis Zampetakis > > > > 日 期:2019年05月02日 15:27:29 > > > > 收件人: > > > > 主 题:Re: Virtual key signing party > > > > > > > > Hi again, > > > >

Re: Virtual key signing party

2019-05-01 Thread Yuzhao Chen
Hi, Stamatis I’d also like to attend the party. === pub rsa2048 2019-05-02 [SC] [expires: 2021-05-01] EC891B124DEF50B5800B1DD6F659E64809F2C0F2 uid Yuzhao Chen sub rsa2048 2019-05-02 [E] [expires: 2021-05-01] === Best

Re: ClassCastException RelOptCostImpl VolcanoCost while using HepPlanner

2019-05-01 Thread Yuzhao Chen
Why you care about cost when use HepPlanner ? The HepPlanner is aimed for some deterministic planning rules, we usually do not need cost in Hep. Some exceptions like Join reorder may need a cost. What kind of planning promotion you did ? I'm kind of curious about it. Best, Danny Chan 在

Re: [DISCUSS] Towards Calcite 1.20.0

2019-04-30 Thread Yuzhao Chen
Thx Michael for listing these changes. [CALCITE-3026] has been canceled, see the discussion in [1]. [CALCITE-3037]’s renaming work has already been done in CALCITE-2969, I’m not that sure if we should merge the EnumerableCorrelate and EnumerableNestedLoopJoin yet, but I think it should not be a

Re: [RESULT] [VOTE] Release apache-calcite-avatica-1.14.0 (release candidate 0)

2019-04-29 Thread Yuzhao Chen
Thx for your work, Francis Best, Danny Chan 在 2019年4月29日 +0800 PM1:56,Francis Chuang ,写道: > Thanks to everyone who has tested the release candidate and given > their comments and votes. > > The tally is as follows. > > 3 binding +1s: > Francis Chuang > Michael Mior > Stamatis Zampetakis > > 1

Re: [ANNOUNCE] New committers: Zhiwei Peng

2019-04-26 Thread Yuzhao Chen
Congratulations, Zhiwei! Best, Danny Chan 在 2019年4月27日 +0800 AM10:37,Francis Chuang ,写道: > Apache Calcite's Project Management Committee (PMC) has invited Zhiwei > Peng to become a committer, and we are pleased to announce that he has > accepted. > > Zhiwei has been contributing to Calcite for a

Re: [ANNOUNCE] Stamatis Zampetakis joins Calcite PMC

2019-04-26 Thread Yuzhao Chen
Congrats, Stamatis. And thx for your help ! Best, Danny Chan 在 2019年4月27日 +0800 AM10:44,dev@calcite.apache.org,写道: > > Congrats, Stamatis. Thanks for your good work.

Re: [ANNOUNCE] New committers: Chunwei Lei

2019-04-26 Thread Yuzhao Chen
Congratulations, Chunwei! Best, Danny Chan 在 2019年4月27日 +0800 AM11:04,Haisheng Yuan ,写道: > Congratulations, Chunwei! > > Thanks ~ > Haisheng Yuan > -- > 发件人:Francis Chuang > 日 期:2019年04月27日 10:34:43 > 收件人: > 主 题:[ANNOUNCE] New

Re: [ANNOUNCE] New committers: Ruben Quesada Lopez

2019-04-26 Thread Yuzhao Chen
Congratulations, Ruben, and thx for your work! Best, Danny Chan 在 2019年4月27日 +0800 AM10:57,Haisheng Yuan ,写道: > Congratulations, Ruben! I am impressed by your contributions. > > Thanks ~ > Haisheng Yuan > -- > 发件人:Francis Chuang > 日 

Re: How to traverse RelNode’s parent conviniently?

2019-04-26 Thread Yuzhao Chen
nts propagation mechanism more sophisticated when we have > an actual use case to drive us. > > Julian > > > > On Apr 26, 2019, at 3:41 PM, Yuzhao Chen wrote: > > > > Thx, Julian > > > > Let me repeat my thoughts about the details again, in order to imp

Re: Function sets (aka flavor and dialect)

2019-04-26 Thread Yuzhao Chen
Thx for the discussing, Julian I’m also confused about the difference between SqlConformance and SqlDialect, and now the Flavor, why not just use one word SqlDialect uniformly ? My interpretation about sql dialect includes the functions, cause they are part of the sql syntax as operators.

Re: How to traverse RelNode’s parent conviniently?

2019-04-26 Thread Yuzhao Chen
kind of metadata, > > it is not a good idea to store the hints in the RelNode instance. > > > > > > > > Best, > > Chunwei > > > > On Wed, Apr 24, 2019 at 11:09 AM Yuzhao Chen wrote: > > > > > > Thx, Julian > > > > > >

Re: Support non-equi join condition for EnumerableJoin, EnumerableMergeJoin and EnumerableSemiJoin ? Just a discussing..

2019-04-26 Thread Yuzhao Chen
[3] is a good step forward. > > Best, > Stamatis > > > > > > On Wed, Apr 24, 2019 at 6:28 AM Yuzhao Chen wrote: > > > Julian, > > > > I also agree with you that we should distinguish between > > EnumerableHashJoin and EnumerableMergeJo

Re: calcite-test-dataset VM has issues with Druid

2019-04-25 Thread Yuzhao Chen
I also ran this issue, and make sure stop/up will definitely make Druid not  work any more. Best, Danny Chan 在 2019年4月26日 +0800 AM7:10,dev@calcite.apache.org,写道: > > Stop/up definitely doesn't > work.

Re: JIRA usage reminders

2019-04-25 Thread YuZhao Chen
+1 for adding the notes to website Vladimir Sitnikov 于2019年4月25日 周四下午9:52写道: > Stamatis> If you see things that are > Stamatis> incorrect or that need to be done differently feel free to > reply to this > Stamatis> email. > > LGTM. > > Stamatis, thanks for the writeup, however I'm inclined to

Re: Support non-equi join condition for EnumerableJoin, EnumerableMergeJoin and EnumerableSemiJoin ? Just a discussing..

2019-04-23 Thread Yuzhao Chen
> (and old) surveys [4, 5] which outline some of the most typical algorithms > > that are used in relational databases. > > > > Best, > > Stamatis > > > > [4] Query evaluation techniques for Large databases ( > > https://web.stanford.edu/class/cs346/2014/grae

Re: How to traverse RelNode’s parent conviniently?

2019-04-23 Thread Yuzhao Chen
// immutable, not null > public final String type; // not null > public final Object operand; // immutable, may be null, must be JSON data > } > > operand must be JSON-style data (null, boolean, number, String, immutable > List of JSON data, or immutable order-preserving Map fr

Re: How to traverse RelNode’s parent conviniently?

2019-04-23 Thread Yuzhao Chen
> cost mechanism, but at least it is straightforward and it works. > > Best Regards, > Andrew Tsvelodub > > On Tue, 23 Apr 2019 at 08:44, Yuzhao Chen wrote: > > > Julian, > > > > I want to add hint support for Calcite, the initial idea was to tag a > > RelNode(transforme

Re: Support non-equi join condition for EnumerableJoin, EnumerableMergeJoin and EnumerableSemiJoin ? Just a discussing..

2019-04-23 Thread Yuzhao Chen
Thx, Julian Why not just support non-equi join condition for every physical algorithm, it does not make much sense if we have both HashJoin and a HashTheraJoin, cause a HashThataJoin with empty non-equi join condition is same as  a HashJoin. And we can remove the limitations in the rule like

Re: How to traverse RelNode’s parent conviniently?

2019-04-22 Thread Yuzhao Chen
r the parents” of the Project. Just write a > rule that matches a Filter on a Project, and trust Volcano to do its job. > > Julian > > > > > > On Apr 22, 2019, at 6:15 AM, Yuzhao Chen wrote: > > > > Thx, Stamatis, that somehow make sense, if i pass

Re: [DISCUSS] Towards Avatica 1.14.0

2019-04-22 Thread Yuzhao Chen
tica/pull/94 > > Francis > > On 12/04/2019 10:01 pm, Francis Chuang wrote: > > Many thanks for jumping on that, Danny! > > > > On 12/04/2019 9:55 pm, Yuzhao Chen wrote: > > > Francis Chuang, i have reviewed these 3 PRs and add some comments, > > > hope ca

Re: How to traverse RelNode’s parent conviniently?

2019-04-22 Thread Yuzhao Chen
github.com/apache/calcite/blob/ee83efd360793ef4201f4cdfc2af8d837b76ca69/core/src/main/java/org/apache/calcite/rel/RelVisitor.java#L43 > > > On Mon, Apr 22, 2019 at 2:14 PM Yuzhao Chen wrote: > > > Now for RelNode, we have method getInput()[1] to fetch the input > > RelNodes, but

Support non-equi join condition for EnumerableJoin, EnumerableMergeJoin and EnumerableSemiJoin ? Just a discussing..

2019-04-22 Thread Yuzhao Chen
EnumerableJoin EnumerableMergeJoin EnumerableSemiJoin all only support equi-join condition[1], and there are some rules that match EquiJoin specificly, like FilterJoinRule will not push non-equi join predicates into the join condition[2], so what is the original intention that these join

How to traverse RelNode’s parent conviniently?

2019-04-22 Thread Yuzhao Chen
Now for RelNode, we have method getInput()[1]  to fetch the input RelNodes, but how we fetch the parent ? For example, we have plan:       join-rel     /             \ scan1     scan2 We can get scan1 and scan2 in join-rel directly with  method getInput, but how can we get the join rel in

Re: Using Calcite for JDBC SQL optimizer without execution

2019-04-17 Thread Yuzhao Chen
Andrew, I’m not very sure if I got your idea right. Do you want a promoted `Sql` compared  to the original ? Then you should transform Calcite’s RelNodes tree to sql, but Calcite do not support this yet, The SqlNode unparse to sql is actually supported. It is not that equivalent for RelNodes

Re: Join, SemiJoin, Correlate

2019-04-17 Thread Yuzhao Chen
rike a balance between > > backwards compatibility and progress. We should allow breaking changes if > > they make a significant improvement. Of course we should mark APIs > > deprecated for one or two releases, if possible. > > > > > On Apr 15, 2019, at 2:01 AM, Yuzha

Re: What is the exactly definition as an equi join ?

2019-04-15 Thread Yuzhao Chen
turns, it calls > > RelOptUtil.pushDownJoinConditions(). So in your example, the cast > > expression will be pushed down and it will still be an equal join. > > > > > On Apr 15, 2019, at 5:40 PM, Yuzhao Chen wrote: > > > > > > If we checkou

Re: What is the exactly definition as an equi join ?

2019-04-15 Thread Yuzhao Chen
ns, it calls > RelOptUtil.pushDownJoinConditions(). So in your example, the cast expression > will be pushed down and it will still be an equal join. > > > On Apr 15, 2019, at 5:40 PM, Yuzhao Chen wrote: > > > > If we checkout the java doc for Calcite EuqiJoin, there i

What is the exactly definition as an equi join ?

2019-04-15 Thread Yuzhao Chen
If we checkout the java doc for Calcite EuqiJoin, there is definition for it: > for any join whose condition is based on column equality But what about if there are function calls in the equi condition operands ? For example: Should we consider Select A.a, B.b from A join B on cast(A.a as int)

Re: Join, SemiJoin, Correlate

2019-04-15 Thread Yuzhao Chen
> Hi Danny, > > > > > > Thanks a lot for taking this on, it is a great start! > > > > > > I didn't look thoroughly through the PR but I noticed that there are many > > > renaming/refactoring of public APIs. I am not sure if we should introd

Re: Join, SemiJoin, Correlate

2019-04-13 Thread YuZhao Chen
Thx, Stamatis and Haisheng Yuan I did rename EnumerableCorrelate and EnumerableJoin, your suggestions are reasonable, I would add them back and mark as deprecated. For Correlate and LogicalCorrelate i already keep the old constructor and method #create(). I will recheck if there are some APIs

Re: Join, SemiJoin, Correlate

2019-04-13 Thread YuZhao Chen
Stamatis and Haisheng Yuan I did rename EnumerableCorrelate and EnumerableJoin, your suggestions are reasonable, I would add them back and mark as deprecated. For Correlate and LogicalCorrelate i already kept the old constructor and method #create(). I will recheck if there are some APIs

Re: [DISCUSS] Towards Avatica 1.14.0

2019-04-12 Thread Yuzhao Chen
alcite-avatica/pull/86 is ready for > > > review, but might require more investigation > > > - https://github.com/apache/calcite-avatica/pull/85 no tests, but > > > maybe the change is not easy to test? > > > > > > Kevin: Do you think these can make

Re: [DISCUSS] Towards Avatica 1.14.0

2019-04-12 Thread Yuzhao Chen
I will help to review these codes. Best, Danny Chan 在 2019年4月12日 +0800 AM6:48,dev@calcite.apache.org,写道: > > CALCITE-2983

Re: Join, SemiJoin, Correlate

2019-04-12 Thread Yuzhao Chen
Hi, @Haisheng Yuan, @Julian Hyde, @Stamatis Zampetakis, @Walaa Eldin Moustafa I have did the work for this discussion, and look forward to your suggestions. ### Diff - Deprecate SemiJoin, EquiJoin, EnumerableSemiJoin, SemiJoinType, EnumerableSemiJoinRule, EnumerableThetaJoin - Make

Re: Welcome to join China User WeChat Group of Calcite

2019-04-09 Thread Yuzhao Chen
That’s awesome, good news for Chinese  Calcite users, thx for your work, Lai Zhou. Best, Danny Chan 在 2019年4月9日 +0800 AM11:53,Lai Zhou ,写道: > hi, guys: >  I create a WeChat group  for  China Users of Apache Calcite, to make it easy > to communicate about Calcite. Now we have 2  committers in

Re: Unable to use default as database name

2019-04-02 Thread YuZhao Chen
Calcite's parser use JavaCC and the built in keywords are configured hard-code, so there is no way to change this. An quote character may be a better choice. Jeff Zhang 于2019年4月2日 周二下午9:15写道: > Thanks Amit. I'd like to keep my system compatible with hive sql, but > unfortunately hive use default

Re: elasticsearch-adapter test failed with "Object 'test'" not found

2019-04-02 Thread Yuzhao Chen
For Object 'test' not found it means Calcite does not load your son model correctly, so it can not find then validate the table there. Maybe you model file is not load correctly. I saw a demo in Calcite code in [1], the path sep is while your sep is <\\>, can you have a try ? [1] 

Re: About aggregation problem

2019-04-02 Thread Yuzhao Chen
Select count(distinct f0) from t Is supported now, can you please past your error stack trace, is it the parse error or plan promotion error ? Best, Danny Chan 在 2019年4月2日 +0800 AM11:31,kakasi2...@163.com ,写道: > hello, > > The problem is about use [count(distinct(ID))],distinct aggregation >

Re: Join, SemiJoin, Correlate

2019-04-01 Thread Yuzhao Chen
I will take it, hope to make some help. Best, Danny Chan 在 2019年4月1日 +0800 PM7:20,Stamatis Zampetakis ,写道: > It seems that the discusion has somehow converged (at least to the major > points). I created CALCITE-2969, for whoever decides to tackle this issue. > > [1]

Re: Problem with Code Generation

2019-03-31 Thread Yuzhao Chen
Julian Feinauer, i have fire a JIRA and prepare to fix it. [1] https://issues.apache.org/jira/browse/CALCITE-2966 Best, Danny Chan 在 2019年4月1日 +0800 AM12:45,dev@calcite.apache.org,写道: > > Hi all, > > I have some problems with the code generation from Linq4j which I'm unable to > resolve myself.

Re: Review requested [CALCITE-2914] Improve how LatticeSuggester deduces foreign keys

2019-03-31 Thread Yuzhao Chen
I will do it. Best, Danny Chan 在 2019年4月1日 +0800 AM6:39,Julian Hyde ,写道: > Can someone please review https://github.com/apache/calcite/pull/1141 > (for > https://issues.apache.org/jira/browse/CALCITE-2914 >

Re: insert timestamp value into postgresql

2019-03-28 Thread Yuzhao Chen
Calcite does not support implicit type cast yet, so it is strict for type compare, e.g. two decimals with different precision or scale will be considered different type. For timestamp(3) and varchar, they are definitely different data types. You can make explicit type cast before inserting

Re: master build broken

2019-03-28 Thread Yuzhao Chen
It seems all the Travis buildings are stuck  at state Waiting to be queued. Best, Danny Chan 在 2019年3月28日 +0800 PM2:40,雷春蔚(勿烦) ,写道: > Hi, > I notice that the travis-ci build of a new PR is much slower than before and > Calcite master looks like still build broken. Is anybody looking into it? > >

Re: master build broken

2019-03-28 Thread Yuzhao Chen
I will take a look. Best, Danny Chan 在 2019年3月28日 +0800 PM2:40,雷春蔚(勿烦) ,写道: > Hi, > I notice that the travis-ci build of a new PR is much slower than before and > Calcite master looks like still build broken. Is anybody looking into it? > > > > Bests, > Chunwei

Re: Help with SQL to Relational Algebra Conversion - No match found for aggregate function signature

2019-03-26 Thread Yuzhao Chen
There is a sum agg func in [1], the reason you can not find the function is that you initialize use constructor `new SqlStdOperatorTable` for the validator which is not initialized, the right way is use SqlStdOperatorTable#instance() [2] or FrameworkConfig#getOperatorTable(). [1] 

Re: [DISCUSS] Towards Avatica 1.14.0

2019-03-26 Thread Yuzhao Chen
Thx for your work Francis, the PRs are not too many, I think the timeline is ok. Best, Danny Chan 在 2019年3月27日 +0800 AM5:19,Francis Chuang ,写道: > I am currently planning to make rc0 available for voting next Friday (5 > April 2019). How does this sound? Does this leave enough time for PRs to >

Re: Help with SQL to Relational Algebra Conversion - No match found for aggregate function signature

2019-03-26 Thread Yuzhao Chen
So what is the SqlOperatorTable you use, usually we use a SqlStdOperatorTable(for builtin operators) chained with a ListSqlOperatorTable(for UDFs), for your case, a single SqlStdOperatorTable is enough. > Michael Tu 于2019年3月27日 周三上午8:37写道: > Hi All, > > I’m a new user to Apache Calcite and

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Yuzhao Chen
Maybe we should fire a jira if it is a bug. Best, Danny Chan 在 2019年3月26日 +0800 PM8:33,Hongze Zhang ,写道: > Ops, correct a typo: > > "... after uncommenting a line ..." -> "... after commenting a line > ...". > > Best, > Hongze > > -- Original Message -- > From: "Hongze Zhang" > To:

Re: missing Schema.contentsHaveChangedSince in v1.18

2019-03-25 Thread Yuzhao Chen
I only found a method about cacheing in SchemaPlus [1], but the  Schema.contentsHaveChangedSince only appears in the doc, i look up the commits and it seems that this method is gone from very old version [2], maybe Julian can answer your question. [1] 

Re: Join, SemiJoin, Correlate

2019-03-23 Thread YuZhao Chen
I kind of prefer 3, for the reasons below: 1. It makes the concept unified and clean. 2. We somehow can not remove the Correlate, cause it's a good logical representation for correlated query, it can be de-correlated to a HashJoin or keep as a NestedLoopJoin, for functionality, it seens like Hive

Re: Isssue with th ekeyword Timestamp in sql query validation.

2019-03-22 Thread YuZhao Chen
timestamp is neither a keyword nor a builtin function in Calcite now, so what is the stackTrace your query throw ? Can you show us more details ? Best, Danny Chan Suhail Aliyar 于2019年3月22日周五 上午2:26写道: > Hello, > > I am Suhail Aliyar, Backend developer at dexlock technologies, Kochi, > India. >

Re: Conditionally Adding Item to a Map

2019-03-22 Thread Yuzhao Chen
Or you can right a UDF by yourself, if you encouter an null value you can just return null and in outer you can filter out the null values. Best, Danny Chan 在 2019年3月21日 +0800 AM2:45,Shahar Cizer Kobrinsky ,写道: > Hey All, > > New to Calcite, trying to express a select statement in SQL where i

Re: Conditionally Adding Item to a Map

2019-03-21 Thread YuZhao Chen
Or you can right a UDF by yourself, if you encouter Best, Danny Chan 在 2019年3月21日 +0800 AM2:45,Shahar Cizer Kobrinsky ,写道: Hey All, New to Calcite, trying to express a select statement in SQL where i build a map. The thing is i want to conditionally add items to it, so for example have key 'c'

How to start up the vm environment after i do Vagrant halt ?

2019-03-20 Thread Yuzhao Chen
Hi, guys. After I did the cmd: vagrant halt and vagrant up, i can not connect to the druid broker again, so what it the right way to halt and start up ? Best, Danny Chan

Re: [ANNOUNCE] New committer: Stamatis Zampetakis

2019-03-15 Thread Yuzhao Chen
Congratulations, Stamatis Zampetakis ! Thank you for your work of Apache Calcite. Best, Danny Chan 在 2019年3月15日 +0800 PM12:09,Muhammad Gelbana ,写道: > Congratulations Stamatis :) > > Thanks for frequently answering my questions and discussing my raised > topics. > > On Fri, Mar 15, 2019, 2:45 AM

Re: About ElasticsearchToEnumerableConverterRule

2019-03-15 Thread Yuzhao Chen
; It is not very clear what is the problem you are trying to solve. > > Maybe it could help if you could share the input plan, planner rules, and > > the expected output. > > > > > > Best, > > Stamatis > > > > Στις Τετ, 13 Μαρ 2019 στις 2:51 π.μ., ο/η

Re: Parantheses in RelBuilder?

2019-03-15 Thread Yuzhao Chen
Hi, Rakesh Nair. RelBuilder/RexBuilder are used to construct rel/rex nodes, but parenthesis are not, parenthesis only defines the scope and precedence of the relational algebra. You only need to construct the rel/rex nodes directly with the defined precedence by parenthesis. Best, Danny Chan 在

Re: [CALCITE-2843] PR review request

2019-03-13 Thread Yuzhao Chen
I would take it, hole to help you. Best, Danny Chan 在 2019年3月13日 +0800 PM10:52,Muhammad Gelbana ,写道: > Could someone kindly review this PR please ? > https://github.com/apache/calcite/pull/1066 > > Thanks, > Gelbana

Re: About ElasticsearchToEnumerableConverterRule

2019-03-12 Thread Yuzhao Chen
Yeah, did you replace the Convention trait of the matched node when matches ? Best, Danny Chan 在 2019年3月12日 +0800 PM8:59,Jocean shi ,写道: > I sure this ConverterRule matches. In other world, this method has excuted. > but the final result is only root RelNode has been replaced. > > > Best >

Re: About ElasticsearchToEnumerableConverterRule

2019-03-12 Thread Yuzhao Chen
The ConverterRule is a RelOptRule but with default implementation of onMatch: public void onMatch(RelOptRuleCall call) { RelNode rel = call.rel(0); if (rel.getTraitSet().contains(inTrait)) { final RelNode converted = convert(rel); if (converted != null) { call.transformTo(converted);

Re: Apply for JIRA contributors permission

2019-03-11 Thread Yuzhao Chen
Thx, Julian, I will contribute to Calcite continuously. Best, Yuzhao Chen 在 2019年3月12日 +0800 AM5:52,Julian Hyde ,写道: > I’ve added you as a JIRA contributor. > > Note “Contributor” is a JIRA term, not an Apache term. It gives you the right > to assign a JIRA case to yourself

Re: About ElasticsearchToEnumerableConverterRule

2019-03-11 Thread Yuzhao Chen
Then what kind of Planner you use, if it is Volcano it is not expected to happen. Best, Yuzhao Chen 在 2019年3月11日 +0800 PM11:08,Jocean shi ,写道: > Thanks for your help. > I get your point. But there are many other rules such as : > private ElasticsearchFilterRule() { > super(Logical

Re: [DISCUSS] Towards Calcite 1.19.0

2019-03-11 Thread Yuzhao Chen
Nice job, Kevin Best, Yuzhao Chen 在 2019年3月11日 +0800 PM9:05,Kevin Risden ,写道: > As of this morning, all JIRAs tagged for 1.19.0 have been resolved or moved > out to 1.20.0. > > I will be starting the release steps this morning. Please hold off on > commits to master while the

  1   2   >