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

2020-01-07 Thread Danny Chan
Internally we have a multi-inputs merge join, for each input there maybe a collation permutations. Best, Danny Chan 在 2020年1月8日 +0800 AM1:20,Xiening Dai ,写道: > Danny, I am not sure how this would affect join re-order. Could you elaborate? > > > > On Jan 7, 2020, at 1:29 AM, Danny Chan wrote: >

Re: Question about Volcano's planner root converters

2020-01-07 Thread Haisheng Yuan
> 1. Should we change the condition of root converters creation from the direct traitset difference to the difference with considering traits hierarchy (like [] includes [1])? I think so. Specifically non-empty required trait diff. Singleton is the only diff in your example. It doesn't care

Re: Draft board report for January 2020

2020-01-07 Thread Juan Pan
Totally agree. It deserves praise that rotate chair annually and run Calcite community so active and in order. Juan Pan (Trista) Senior DBA & PPMC of Apache ShardingSphere(Incubating) E-mail: panj...@apache.org On 01/7/2020 04:17,Julian Hyde wrote: Is it worth

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

2020-01-07 Thread Haisheng Yuan
> @Haisheng, are you doing something like that? Kind of, but not exactly. It is about on-demand trait propagation. @Roman seems to be keen on space pruning for Calcite. But IMHO, for now, the main reason of Calcite's poor performance is not lack of branch & bound space puning, but - rule

Re: [DISCUSS] Avatica 1.16.0 dockerfiles broken. Release 1.17.0?

2020-01-07 Thread Francis Chuang
In terms of the changes for this release, the dockerfiles has been fixed and I believe you've reordered the steps for finalizing a release using gradle. I think the problem is somewhat annoying, but has not been an issue before. If there is some consensus regarding this, I am happy to make

Re: Gradle documentation update

2020-01-07 Thread Francis Chuang
What I meant was that https://github.com/apache/calcite-site/commit/81960613e7750a9191280719352ae941a7d6a22d#diff-efedb3376e58f7bcc03c666d03682ce3R154 looked like it was built from calcite's master branch, so the documentation is missing. The site branch does not have any commits for gradle:

Re: [DISCUSS] Avatica 1.16.0 dockerfiles broken. Release 1.17.0?

2020-01-07 Thread Vladimir Sitnikov
AFAIK it is up to the release manager. Vladimir

Re: Gradle documentation update

2020-01-07 Thread Vladimir Sitnikov
>Can you cherry pick the appropriate commits for the migration >into the site branch? What do you mean by that? Can we just revert the invalid commits and be done with it? I already suggested that the site update should be simplified, and now we have clear evidence that the current process of

Re: Gradle documentation update

2020-01-07 Thread Francis Chuang
Ah, I see the problem now. I always build the site from the site branch (as there may be things on master that shouldn't be published before a release). Can you cherry pick the appropriate commits for the migration into the site branch? I'll rebuild and push the site. Francis On 8/01/2020

Re: Gradle documentation update

2020-01-07 Thread Vladimir Sitnikov
Francis>There is Francis> https://github.com/apache/calcite-site/commit/81960613e7750a9191280719352ae941a7d6a22d , Francis>but there doesn't appear to be any changes to the build instructions for Francis>gradle. Here you go:

Re: [DISCUSS] Avatica 1.16.0 dockerfiles broken. Release 1.17.0?

2020-01-07 Thread Francis Chuang
Has there been any progress/solution regarding the LF and CRLF issue? Francis On 30/12/2019 2:43 am, Vladimir Sitnikov wrote: Stamitis>I was thinking that if the check says that there is no problem then apply would be a noop. The current logic of 'apply' is it computes the appropriate style

Re: Gradle documentation update

2020-01-07 Thread Francis Chuang
I pushed the latest site files under the avatica folder only in that commit. There were no changes to Calcite's site (everything other than the avatica folder). There is https://github.com/apache/calcite-site/commit/81960613e7750a9191280719352ae941a7d6a22d, but there doesn't appear to be any

Re: [DISCUSS] RelOptTableImpl#toRel vs EnumerableTableScan

2020-01-07 Thread Vladimir Sitnikov
So far I have PR https://github.com/apache/calcite/pull/1721 that adds verification to EnumerableTableScan constructor. Unfortunately, we have a lot of test cases that assume the relation would be EnumerableTableScan even in the case test verifies logical plan only :( That is why I added extra

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

2020-01-07 Thread Julian Hyde
I have logged https://issues.apache.org/jira/browse/CALCITE-3716. No one is working on fixing it currently. On Tue, Jan 7, 2020 at 2:14 AM Juan Pan wrote: > > Thanks your explanation, Julian. Does it mean the optimization of this JDBC > interface may be included in next release of Calcite? > >

[jira] [Created] (CALCITE-3716) ResultSetMetaData.getTableName should return empty string, not null, when column does not map to a table

2020-01-07 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-3716: Summary: ResultSetMetaData.getTableName should return empty string, not null, when column does not map to a table Key: CALCITE-3716 URL:

[DISCUSS] getCumulativeCost vs Planner#getCost(rel, mq)

2020-01-07 Thread Vladimir Sitnikov
Hi, I've found there are two ways to compute the cumulative cost, and they happen to be quite different. VolcanoPlanner#getCost seems to be the right one (see [1]) It properly accounts for RelSubset and uses its bestCost On the other hand, mq.getCumulativeCost(rel) is quite poor (see [2]). It

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

2020-01-07 Thread Roman Kondakov
I forgot to mention that this approach was inspired by Stamatis's idea [1] [1] https://ponymail-vm.apache.org/_GUI_/thread.html/d8f8bc0efd091c0750534ca5cd224f4dfe8940c9d0a99ce486516fd5@%3Cdev.calcite.apache.org%3E -- Kind Regards Roman Kondakov On 07.01.2020 21:14, Roman Kondakov wrote: >

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

2020-01-07 Thread Roman Kondakov
Hello! As Vladimir Ozerov mentioned, the general problem here is that VolcanoPlanner applies both logical and physical rules in a top-down manner. It's more like the original volcano paper approach [1]: > In the Volcano search strategy, a first phase applied all > transformation rules to create

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

2020-01-07 Thread Xiening Dai
Danny, I am not sure how this would affect join re-order. Could you elaborate? > On Jan 7, 2020, at 1:29 AM, Danny Chan wrote: > > Hi, guys, it seems that the discussion silent now, so do we have some > conclusion that can contribute to current code, i.e. the suggested API change > or new

Re: Gradle documentation update

2020-01-07 Thread Michael Mior
Sorry for not specifying earlier, it's the pages linked below. If you search for "mvn" and "pom.xml" you'll see the instances I mean. It looks like the release documentation also still uses Maven. https://calcite.apache.org/develop/ https://calcite.apache.org/docs/howto.html -- Michael Mior

Re: Gradle documentation update

2020-01-07 Thread Vladimir Sitnikov
It looks like Francis recently pushed "Update website for Avatica 1.16" which looks like 1,674 changed files with 167,295 additions and 628,539 deletions. https://github.com/apache/calcite-site/commit/3d92029cc7718e2b66d888dc9021047879145465 Francis, can you please double-check? Vladimir

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

2020-01-07 Thread Haisheng Yuan
It is still on my radar. I have been busy these days, but will send out a design doc in a few days. But just a heads up, the change would be larger than everyone's expected. - Haisheng -- 发件人:Danny Chan 日 期:2020年01月07日 17:29:46

Support for current_timestamp(p) function till precision 6

2020-01-07 Thread Bindi Barnwal
Hi Team, We have a variable *MAX_DATETIME_PRECISION* in SqlTypeName enum which is currently set to 3 in the code. We need to support the current_timestamp(p) function, where 'p' can be 0 to 6. eg: select current_timestamp(6) from employee; This functions is present in dialects - Teradata -

Re: Gradle documentation update

2020-01-07 Thread Stamatis Zampetakis
Note that the master branch documentation [1][2] seems to be updated with respect to gradle. The problem seems to be related with what is pushed in g...@github.com:apache/calcite-site. [1] https://github.com/apache/calcite/blob/master/site/_docs/howto.md [2]

[jira] [Created] (CALCITE-3715) Add a interface to pass the table hints to RelOptTable

2020-01-07 Thread Danny Chen (Jira)
Danny Chen created CALCITE-3715: --- Summary: Add a interface to pass the table hints to RelOptTable Key: CALCITE-3715 URL: https://issues.apache.org/jira/browse/CALCITE-3715 Project: Calcite

Re: Gradle documentation update

2020-01-07 Thread Forward Xu
OK, I can try to fix this. Feng Zhu 于2020年1月7日周二 下午8:05写道: > I also noticed the same problem several days ago when a colleague > complained he failed to build Calcite according to the documents on > website. > > > E.g., > >

Re: Gradle documentation update

2020-01-07 Thread Feng Zhu
I also noticed the same problem several days ago when a colleague complained he failed to build Calcite according to the documents on website. E.g., https://calcite.apache.org/docs/howto.html#building-from-a-source-distribution *$ git clone git://github.com/apache/calcite.git

Re: [DISCUSS] RelOptTableImpl#toRel vs EnumerableTableScan

2020-01-07 Thread Stamatis Zampetakis
The fact that RelOptTableImpl creates directly an EnumerableTableScan seems to be a residue of the history (at the very beginning the class was only used to create EnumerableTableScan operators). I guess it is also an attempt to reduce the search space of the optimizer short-circuiting some

Re: Gradle documentation update

2020-01-07 Thread Vladimir Sitnikov
Can you clarify an url which has stale information? Vladimir

Gradle documentation update

2020-01-07 Thread Michael Mior
I noticed when the changed was made from Maven to Gradle, the documentation on the development page has not been updated. I can change the compilation command, but could any IDE users update the documentation there? -- Michael Mior mm...@apache.org

Re: Draft board report for January 2020

2020-01-07 Thread Stamatis Zampetakis
Thanks everybody for the feedback, I submitted the report! On Mon, Jan 6, 2020 at 9:17 PM Julian Hyde wrote: > Is it worth mentioning that we have a new PMC chair? (Of course you’re too > modest to mention it.) > > I am proud of the fact that we change the chair annually, and are now on > our

Re: Monthly online Calcite meetups

2020-01-07 Thread Stamatis Zampetakis
Very few people replied to this thread so apparently there is no much interest for setting up recurrent meetups. On Mon, Jan 6, 2020 at 5:04 PM Muhammad Gelbana wrote: > Did we decide a time yet ? > > On Sun, Dec 22, 2019 at 11:31 AM Muhammad Gelbana > wrote: > > > Here are my availability

Question about Volcano's planner root converters

2020-01-07 Thread Roman Kondakov
Hello! I have a couple questions about method VolcanoPlanner#ensureRootConverters [1]. In this method we first calculate the difference of traits between root subset and other subsets which belong to the same set as the root: ImmutableList difference =

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

2020-01-07 Thread Juan Pan
Thanks your explanation, Julian. Does it mean the optimization of this JDBC interface may be included in next release of Calcite? Juan Pan (Trista) Senior DBA & PPMC of Apache ShardingSphere(Incubating) E-mail: panj...@apache.org On 01/7/2020 11:17,Julian Hyde

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

2020-01-07 Thread Danny Chan
Hi, guys, it seems that the discussion silent now, so do we have some conclusion that can contribute to current code, i.e. the suggested API change or new abstraction ? Or better, can someone give a design doc so that we can push and make that implemented ? Personally I was always looking