[QUESTION] How could getTableName(columnIndex) return the correct result?

2020-01-05 Thread Juan Pan
Hi Calcite Community, Thanks for your attention. After failing self-helping by debug source code, i sent this email for your help. :) My query SQL is `SELECT count(*) a FROM test`, and i called JDBC interface, i.e, `ResultSet.getMetaData().getTableName(1)` to get table name, i.e, test,

Re: [discuss] Enhanced MATH Function

2020-01-05 Thread Chunwei Lei
Thanks for proposing this, Forward. IMHO, we can implement functions that are supported by major vendors. As for others, we can implement it when there is a need. Best, Chunwei On Mon, Jan 6, 2020 at 10:38 AM Forward Xu wrote: > Hi everybody, > > > > I'd like to kick off a discussion on

[discuss] Enhanced MATH Function

2020-01-05 Thread Forward Xu
Hi everybody, I'd like to kick off a discussion on Enhanced MATH functions in calcite. I recently checked java's math function and found that some functions in calcite are not supported. So I made some comparisons with some commonly used databases to discuss whether these functions need to

[discuss] Enhanced MATH Function

2020-01-05 Thread forwardxu
Hi everybody, I'd like to kick off a discussion on Enhanced MATH functions in calcite. I recently checked java's math function and found that some functions in calcite are not supported. So I made some comparisons with some commonly used databases to discuss whether these functions need

Re: [DISCUSS] Revert [CALCITE-1842] Sort.computeSelfCost() calls makeCost() with arguments in wrong order

2020-01-05 Thread Vladimir Sitnikov
Stamatis>HepPlanner does not perform cost-based decisions so for most use-cases I It seems to have some cost-based decisions, so providing ill-defined cost seems wrong. Well, let's see how new VolcanoCost would work, and then we could discuss Hep. Stamatis>Although it is nice to account for CPU

Re: [DISCUSS] Stream tables vs hash joins

2020-01-05 Thread Stamatis Zampetakis
Possibly we could also rely on RelOptCostFactory#makeInfiniteCost and RelOptCost#isInfinite. Best, Stamatis On Fri, Jan 3, 2020 at 8:04 PM Rui Wang wrote: > +1 on having a type of property on Relnode to make know which node is steam > or non-stream. In Apache Beam SQL's practice, stream joins

Re: [DISCUSS] Revert [CALCITE-1842] Sort.computeSelfCost() calls makeCost() with arguments in wrong order

2020-01-05 Thread Stamatis Zampetakis
Thanks for the PR! HepPlanner does not perform cost-based decisions so for most use-cases I don't think it matters a lot what is the cost. For more advanced use-cases, where there might be rules that use CumulativeCost and other kinds of such metadata, the HepPlanner can be configured with

[jira] [Created] (CALCITE-3710) MaterializationService#defineMaterialization should inherit connection properties

2020-01-05 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-3710: -- Summary: MaterializationService#defineMaterialization should inherit connection properties Key: CALCITE-3710 URL: https://issues.apache.org/jira/browse/CALCITE-3710

[jira] [Created] (CALCITE-3709) Use "rejected row count" for RelOptCost#getRows

2020-01-05 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-3709: -- Summary: Use "rejected row count" for RelOptCost#getRows Key: CALCITE-3709 URL: https://issues.apache.org/jira/browse/CALCITE-3709 Project: Calcite

Re: [DISCUSS] Revert [CALCITE-1842] Sort.computeSelfCost() calls makeCost() with arguments in wrong order

2020-01-05 Thread Vladimir Sitnikov
In the meantime, I've created a PR that updates VolcanoCost: https://github.com/apache/calcite/pull/1722 Vladimir

[jira] [Created] (CALCITE-3708) Make VolcanoCost account cpu and io properties when comparing costs

2020-01-05 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-3708: -- Summary: Make VolcanoCost account cpu and io properties when comparing costs Key: CALCITE-3708 URL: https://issues.apache.org/jira/browse/CALCITE-3708

Re: [DISCUSS] Revert [CALCITE-1842] Sort.computeSelfCost() calls makeCost() with arguments in wrong order

2020-01-05 Thread Vladimir Sitnikov
>This of course requires the VolcanoCost to be adapted. What do you think of HepPlanner? It uses RelOptCostImpl.FACTORY by default which explicitly ignores CPU and IO cost factors :(( Regarding cost#rows, there's a problem: cost#rows field does not add well when computing cumulative cost. What

[jira] [Created] (CALCITE-3707) Implement COSH function

2020-01-05 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3707: --- Summary: Implement COSH function Key: CALCITE-3707 URL: https://issues.apache.org/jira/browse/CALCITE-3707 Project: Calcite Issue Type: Improvement

Re: Draft board report for January 2020

2020-01-05 Thread Stamatis Zampetakis
@Andrei: If I remember well both Ignite and Hazelcast decided to adopt Calcite and we mentioned Ignite in the previous board report. Best, Stamatis On Thu, Jan 2, 2020 at 9:49 PM Andrei Sereda wrote: > +1 > > Question regarding Hazelcast : > > > Finally, the Hazelcast system has decided to