Re: Error when passing hepPlanner to

2019-02-04 Thread Stamatis Zampetakis
Hi Val, In order to run the HepPlanner you only need to execute HepPlanner#findBestExp() to obtain the transformed plan (no need to pass it also to a program which will call the same method again). Note also that planner instances are meant to be used only once since they are stateful, so you shou

Re: Principle of least astonishment when dealing with Rules and RelBuidlerFactory

2019-02-04 Thread Julian Hyde
None of your 4 points prove that anything is fundamentally broken. In particular, the ability to represent cyclic graphs is a feature, not a bug. It’s not “too late” if a rule fires and creates a RelNode and that RelNode’s constructor asserts. Because that rule is being run in a debugger, as par

[jira] [Created] (CALCITE-2831) Fix EXTRACT(SECOND FROM )

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2831: - Summary: Fix EXTRACT(SECOND FROM ) Key: CALCITE-2831 URL: https://issues.apache.org/jira/browse/CALCITE-2831 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-2830) Fix AvgVarianceConvertlet

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2830: - Summary: Fix AvgVarianceConvertlet Key: CALCITE-2830 URL: https://issues.apache.org/jira/browse/CALCITE-2830 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-2829) Fix RexSimplify#processRange cast issue

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2829: - Summary: Fix RexSimplify#processRange cast issue Key: CALCITE-2829 URL: https://issues.apache.org/jira/browse/CALCITE-2829 Project: Calcite Issue T

[jira] [Created] (CALCITE-2828) Handle cost propagation properly in Volcano Planner

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2828: - Summary: Handle cost propagation properly in Volcano Planner Key: CALCITE-2828 URL: https://issues.apache.org/jira/browse/CALCITE-2828 Project: Calcite

[jira] [Created] (CALCITE-2827) Allow CONVENTION.NONE planning with VolcanoPlanner

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2827: - Summary: Allow CONVENTION.NONE planning with VolcanoPlanner Key: CALCITE-2827 URL: https://issues.apache.org/jira/browse/CALCITE-2827 Project: Calcite

[jira] [Created] (CALCITE-2823) Prevent optimization of non-deterministic functions

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2823: - Summary: Prevent optimization of non-deterministic functions Key: CALCITE-2823 URL: https://issues.apache.org/jira/browse/CALCITE-2823 Project: Calcite

[jira] [Created] (CALCITE-2826) Add versions of create() for LogicalSort and LogicalExchange that take cluster and trait set as input

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2826: - Summary: Add versions of create() for LogicalSort and LogicalExchange that take cluster and trait set as input Key: CALCITE-2826 URL: https://issues.apache.org/jira/brow

[jira] [Created] (CALCITE-2825) Add function double power (BigDecimal b0, long b1)

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2825: - Summary: Add function double power (BigDecimal b0, long b1) Key: CALCITE-2825 URL: https://issues.apache.org/jira/browse/CALCITE-2825 Project: Calcite

[jira] [Created] (CALCITE-2824) Fix invalid usage of RexExecutorImpl

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2824: - Summary: Fix invalid usage of RexExecutorImpl Key: CALCITE-2824 URL: https://issues.apache.org/jira/browse/CALCITE-2824 Project: Calcite Issue Type

[jira] [Created] (CALCITE-2822) Allow multi-join rules to be used with any project/filter

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2822: - Summary: Allow multi-join rules to be used with any project/filter Key: CALCITE-2822 URL: https://issues.apache.org/jira/browse/CALCITE-2822 Project: Calcite

[jira] [Created] (CALCITE-2821) Improve extensibility of Volcano Planner

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2821: - Summary: Improve extensibility of Volcano Planner Key: CALCITE-2821 URL: https://issues.apache.org/jira/browse/CALCITE-2821 Project: Calcite Issue

[jira] [Created] (CALCITE-2819) Add a version of LoptOptimizeJoinRule that uses the first ordering it finds

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2819: - Summary: Add a version of LoptOptimizeJoinRule that uses the first ordering it finds Key: CALCITE-2819 URL: https://issues.apache.org/jira/browse/CALCITE-2819

[jira] [Created] (CALCITE-2820) Add a version of AggregateReduceFunctionsRule that does not reduce SUm -> SUM0

2019-02-04 Thread Siddharth Teotia (JIRA)
Siddharth Teotia created CALCITE-2820: - Summary: Add a version of AggregateReduceFunctionsRule that does not reduce SUm -> SUM0 Key: CALCITE-2820 URL: https://issues.apache.org/jira/browse/CALCITE-2820

Re: Error connecting Calcite to Elasticsearch

2019-02-04 Thread Michael Mior
This looks like a bug. Could you try adding another key "userConfig": "{}" under "operand" in your model file and see if that runs? -- Michael Mior mm...@apache.org Le lun. 4 févr. 2019 à 14:29, Allan Keers a écrit : > > Hi there, > I can connect my Calcite installation to the sample csv and que

Error connecting Calcite to Elasticsearch

2019-02-04 Thread Allan Keers
Hi there, I can connect my Calcite installation to the sample csv and query the tables. When I try to connect to Elasticsearch I get the following error. Any help would be appreciated. Thanks, Allan Keers sqlline version 1.6.0 sqlline> !connect jdbc:calcite:model=/Users/Administrator/dev/calcit

Re: Intention behind RelNode.accept(RexShuttle)

2019-02-04 Thread Julian Hyde
RexShuttle does not have a watertight specification. It does what it needs to do for the cases that use it. Generally, if the sub-elements of a RelNode are sub-types of RexNode, RexShuttle processes them, otherwise it ignores them. But pragmatically, as long as what you do doesn’t break the test

Re: getting all the equivalent query plans of an sql query

2019-02-04 Thread Julian Hyde
Michael is correct that to get all alternative plans you can create your own visitor. However note that the number of plans is typically very large. Consider a query that starts of as Scan -> Project -> Filter and broadens to 3 equivalence sets with 3 RelNodes in each: {R11, R12, R13} ->

Re: Planner state vs CannotPlanException vs humans

2019-02-04 Thread Michael Mior
I'm not convinced there aren't better alternatives, so I hope we can continue to explore this. Specifically with respect to the statement "It means there's not enough rules to produce the node with desired properties", it would be great if we could more clearly identify what properties the missing

Re: Release managers

2019-02-04 Thread Michael Mior
Great idea. I was intending to volunteer as RM last time, but with the time pressure, I didn't respond soon enough. I'm happy to take the April release (1.20). -- Michael Mior mm...@apache.org Le jeu. 31 janv. 2019 à 18:54, Andrei Sereda a écrit : > > Release Target date Release manager > ==

Re: getting all the equivalent query plans of an sql query

2019-02-04 Thread Michael Mior
In general, there's no way to guarantee you get "all" the plans for a particular query. If you want to get a variety of plans and their associated cost, take a look at CheapestPlanVisitor in RelSubset.java. This is used by VolcanoPlanner to build the cheapest plan at the end of the planning phase.

[jira] [Created] (CALCITE-2818) Implementation of Extract (ExtractImplementor) returns wrong result for dates before Epoch.

2019-02-04 Thread JIRA
Mickaël Sauvée created CALCITE-2818: --- Summary: Implementation of Extract (ExtractImplementor) returns wrong result for dates before Epoch. Key: CALCITE-2818 URL: https://issues.apache.org/jira/browse/CALCITE-28

Calcite-Master - Build # 1007 - Still Failing

2019-02-04 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #1007) Status: Still Failing Check console output at https://builds.apache.org/job/Calcite-Master/1007/ to view the results.

Re: Intention behind RelNode.accept(RexShuttle)

2019-02-04 Thread Piotr Nowojski
Hi Stamatis, Thank you for the answer! I have some questions to clarify that. 1. What if my new node doesn’t strictly have a `RexNode`, but it’s referring to the inputs indirectly, like via `String fieldName` instead of using RexInputRef? 2. Arguably this is the similar thing what `Aggregate` no