Re: Calcite - Model - MongoDB view

2019-10-15 Thread Andrei Sereda
Hi Neha Saini, I'm afraid currently array access is not translated in mongo adapter. There is a PR https://github.com/apache/calcite/pull/720 which needs to be corrected. Thanks, Andrei. On Mon, Oct 14, 2019 at 3:01 AM Danny Chan wrote: > Hi, Neha Saini > > What do you mean by MongoDB view,

Re: Re: [DISCUSSION] Extension of Metadata Query

2019-10-15 Thread Haisheng Yuan
That's a good question. Yes. And the method getMetadataQuery from RelOptRuleCall also retrieves MetadataQuery from RelOptCluster. Any other better places? - Haisheng -- 发件人:Julian Hyde 日 期:2019年10月16日 11:02:33 收件人:dev 主 题:Re:

Re: [DISCUSS] Make Enumerable operators responsive to interrupts

2019-10-15 Thread Julian Hyde
I didn’t realize that it was cooperative. I now see that we need to call Thread.interrupted(), and that no exceptions will be thrown (unless we call a method that declares ’throws InterruptedException’). It seems doable. Julian > On Oct 9, 2019, at 3:55 PM, Stamatis Zampetakis wrote: > >

Re: [DISCUSS] Support Sql Hint for Calcite

2019-10-15 Thread Julian Hyde
By “skeptical” I mean that I think we can come up with a mechanism to copy hints when applying planner rules, but even when we have implemented that mechanism there will be many cases where people want a hint and that hint is not copied to the RelNode where it is needed, and many other cases

Re: [DISCUSSION] Extension of Metadata Query

2019-10-15 Thread Julian Hyde
Yes, but why RelOptCluster? Besides the fact that there happened to be a method there. > On Oct 15, 2019, at 7:30 PM, Haisheng Yuan wrote: > > > Is there a good rationale for attaching one to RelOptCluster > Customized RelMetadataQuery with code generated meta handler for customized >

Re: Re: [DISCUSSION] Extension of Metadata Query

2019-10-15 Thread Haisheng Yuan
> Is there a good rationale for attaching one to RelOptCluster Customized RelMetadataQuery with code generated meta handler for customized metadata, also can provide convenient way to get metadata. - Haisheng -- 发件人:Julian Hyde 日 

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-15 Thread Danny Chan
Just open it in the SqlToRelConverter [1] [1]  https://github.com/apache/calcite/blob/3cbbafa941128dc5097c2a26711f5751f764e12d/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L5692 Best, Danny Chan 在 2019年10月16日 +0800 AM12:23,Rommel Quintanilla ,写道: > Hi Stamatis, thank you

Re: [DISCUSS] Support Sql Hint for Calcite

2019-10-15 Thread Danny Chan
Thanks Julian > I am skeptical that RelWithHint will work for large queries. For “skeptical” do you mean how to transfer the hints during rule planning ? I’m also not that confident yet. > How do we introduce it in a reversible way Do you mean transform the RelWithHint back into the SqlHint ?

Re: [DISCUSS] Support Sql Hint for Calcite

2019-10-15 Thread Julian Hyde
I am skeptical that RelWithHint will work for large queries. How do we introduce it in a reversible way? What are the other options? > On Oct 10, 2019, at 1:29 AM, Danny Chan wrote: > > Hi, Julian, do you think we can make some effort to push this feature into > release 1.22 ? The Flink

Re: [DISCUSSION] Extension of Metadata Query

2019-10-15 Thread Julian Hyde
Having reviewed https://issues.apache.org/jira/browse/CALCITE-3403 and https://issues.apache.org/jira/browse/CALCITE-2018 today I am worried about the direction RelMetadataQuery is taking.

[jira] [Created] (CALCITE-3418) Grouped Window Function "$TUMBLE" should return "

2019-10-15 Thread Rui Wang (Jira)
Rui Wang created CALCITE-3418: - Summary: Grouped Window Function "$TUMBLE" should return " Key: CALCITE-3418 URL: https://issues.apache.org/jira/browse/CALCITE-3418 Project: Calcite Issue Type:

Re: Re: [DISCUSSION] Extension of Metadata Query

2019-10-15 Thread Haisheng Yuan
I would like to bring this discussion up again. We created our own metadata provider, and set it to RelMetadataQuery by calling RelMetadataQuery.THREAD_PROVIDERS.set() If we just use all the types of metadata provided by Calcite, it should be fine. But given that we have created new types of

Re: [DISCUSS] Avatica - how efficient is our protocol?

2019-10-15 Thread Michael Mior
I thought I would resurrect this thread given the announcement of Flight (link below). I'm not too familiar with Avatica, but it seems like Flight (essentially a client-server framework for transporting Arrow data) could be a good fit.

[jira] [Created] (CALCITE-3417) The alias is invalid in RelBuilder#join(JoinRelType, RexNode)

2019-10-15 Thread jamie12221 (Jira)
jamie12221 created CALCITE-3417: --- Summary: The alias is invalid in RelBuilder#join(JoinRelType, RexNode) Key: CALCITE-3417 URL: https://issues.apache.org/jira/browse/CALCITE-3417 Project: Calcite

Re: Different performance of the same code in two laptops

2019-10-15 Thread Enrico Olivelli
Can you share the differences between the two machines? RAM, CPU, OS As far as I know internal java ergonomics make code run very differently depending on available resources Enrico Il mar 15 ott 2019, 15:40 Stamatis Zampetakis ha scritto: > Hi Makis, > > Use a profiler (e.g., VisualVM)

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-15 Thread Rommel Quintanilla
Hi Stamatis, thank you for your attention and actually many thanks to everyone who is seeing/commenting about this topic. To be honest I didn't know about the existence of RelFieldTrimmer. I would like to test this, how could I use RelFieldTrimmer? can you give me a suggestion, please? On

[jira] [Created] (CALCITE-3416) SQL Dialects "DEFAULT"s should be more extensible

2019-10-15 Thread Steven Talbot (Jira)
Steven Talbot created CALCITE-3416: -- Summary: SQL Dialects "DEFAULT"s should be more extensible Key: CALCITE-3416 URL: https://issues.apache.org/jira/browse/CALCITE-3416 Project: Calcite

[jira] [Created] (CALCITE-3415) Cannot parse REGEXP_SUBSTR in BigQuery

2019-10-15 Thread Pranay Parmar (Jira)
Pranay Parmar created CALCITE-3415: -- Summary: Cannot parse REGEXP_SUBSTR in BigQuery Key: CALCITE-3415 URL: https://issues.apache.org/jira/browse/CALCITE-3415 Project: Calcite Issue Type:

Re: Different performance of the same code in two laptops

2019-10-15 Thread Stamatis Zampetakis
Hi Makis, Use a profiler (e.g., VisualVM) and check where the time goes. You can also compare the snapshots between the two machines. Best, Stamatis On Tue, Oct 15, 2019 at 3:08 PM Michael Mior wrote: > I think it's going to be hard for anyone to give you specific advice > without more

Re: [DISCUSS] Automated security fixes via dependabot

2019-10-15 Thread Michael Mior
Creating a JIRA shouldn't be too painful making use of GitHub Actions. We should be able to trigger this whenever a dependabot PR is created. It does add an extra dependency on GitHub, but if we're using dependabot, we have that anyway. -- Michael Mior mm...@apache.org Le lun. 14 oct. 2019 à

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-15 Thread XING JIN
Hi Rommel ~ I'm very happy you tried the patch ~ Well the stacktrace you provided seems outdated ~ I updated the the code several hours ago. The current commit id is 05d0e2d9fbadec060e54c622824b3725df36aab0 Could you please try the case again and send me the exception and related information ? Or

Re: Different performance of the same code in two laptops

2019-10-15 Thread Michael Mior
I think it's going to be hard for anyone to give you specific advice without more information. How are you measuring the runtime? You may need to instrument the Calcite code, but I would suggest breaking down the runtime more to find out where the slowdown is happening. On a related note, the

[jira] [Created] (CALCITE-3414) Unify Expression'type cast and conversion as a robust one

2019-10-15 Thread Feng Zhu (Jira)
Feng Zhu created CALCITE-3414: - Summary: Unify Expression'type cast and conversion as a robust one Key: CALCITE-3414 URL: https://issues.apache.org/jira/browse/CALCITE-3414 Project: Calcite

Re: [QUESTION] Pushing up evaluations from LogicalProjects

2019-10-15 Thread Rommel Quintanilla
Hi Jin, your contribution is awesome! thanks. I tested it and works like a charm in most cases. Definitely clearer than the approach that I was trying. However, on the application I'm working on, I found a weird issue that I wasn't able to reproduce as a unit test on the calcite-core project.

Different performance of the same code in two laptops

2019-10-15 Thread Serafeim (Makis) Papadias
Hello everyone, I am experimenting with rules and volcano optimiser lately and I am facing something weird. I run my code through Intellij IDE. The databases are set the same way in both machines and since I care only about query rewriting for now I just read the table schemas from the

[jira] [Created] (CALCITE-3413) AssertionError for interpertering union/intersect/minus with null value

2019-10-15 Thread Wang Yanlin (Jira)
Wang Yanlin created CALCITE-3413: Summary: AssertionError for interpertering union/intersect/minus with null value Key: CALCITE-3413 URL: https://issues.apache.org/jira/browse/CALCITE-3413 Project: