[jira] [Created] (CALCITE-2508) Upgrade airlift-tpch

2018-08-29 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-2508: Summary: Upgrade airlift-tpch Key: CALCITE-2508 URL: https://issues.apache.org/jira/browse/CALCITE-2508 Project: Calcite Issue Type: Bug

Re: [VOTE] Release calcite-avatica-go-3.1.0 (release candidate 0)

2018-08-29 Thread Francis Chuang
Hey Michael, If you have docker and docker-compose installed on your machine, you can run: "docker-compose up --build" from the root of the directory. This will automatically run all tests (around 5 minutes). Francis On 30/08/2018 9:55 AM, Michael Mior wrote: +1 (binding) Checked hash and

Re: [VOTE] Release calcite-avatica-go-3.1.0 (release candidate 0)

2018-08-29 Thread Michael Mior
+1 (binding) Checked hash and signature and compiled. Did not run tests since I don't currently have Avatica set up on my new dev box. -- Michael Mior mm...@apache.org Le mer. 29 août 2018 à 19:22, Francis Chuang a écrit : > Hi all, > > I have created a release for Apache Calcite Avatica Go

Re: JSON support

2018-08-29 Thread Julian Hyde
The rules for Parser.jj are a little different. JavaCC needs to parse the Java fragments inside rules and sometimes it can’t handle modern Java syntax such as “new ArrayList<>()”. > On Aug 29, 2018, at 1:16 PM, Michael Mior wrote: > > One thing that jumped out to me was the use of an explicit

Re: [VOTE] Release calcite-avatica-go-3.1.0 (release candidate 0)

2018-08-29 Thread Francis Chuang
I missed the underscore in the release notes. Please see the release notes here: https://github.com/apache/calcite-avatica-go/blob/master/site/_docs/go_history.md On 30/08/2018 9:22 AM, Francis Chuang wrote: Hi all, I have created a release for Apache Calcite Avatica Go 3.1.0, release

[VOTE] Release calcite-avatica-go-3.1.0 (release candidate 0)

2018-08-29 Thread Francis Chuang
Hi all, I have created a release for Apache Calcite Avatica Go 3.1.0, release candidate 0. The release notes are available here: https://github.com/apache/calcite-avatica-go/blob/master/site/go_history.md The commit to be voted on:

Re: CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Julian Hyde
I haven’t read the full PR. (Sorry, finite time due to $dayjob.) If the PR only removes output from the screen or log during tests, I’m fine. > On Aug 29, 2018, at 11:55 AM, Vladimir Sitnikov > wrote: > > Julian>I think we should just solve problem 1 for now. > > Does that mean you agree to

Re: Giving the Calcite logo some love

2018-08-29 Thread Stamatis Zampetakis
Vladimir>Could you flip rhombus so it goes right-up? https://svgshare.com/s/86r I hope this is what you meant. Best, Stamatis Στις Τετ, 29 Αυγ 2018 στις 6:30 μ.μ., ο/η Michael Mior έγραψε: > Just a note since we're on the topic that whatever logos we come up with > should be sure to have TM

[jira] [Created] (CALCITE-2507) Aliasing a star in select list should throw a parsing error.

2018-08-29 Thread Hanumath Rao Maduri (JIRA)
Hanumath Rao Maduri created CALCITE-2507: Summary: Aliasing a star in select list should throw a parsing error. Key: CALCITE-2507 URL: https://issues.apache.org/jira/browse/CALCITE-2507

[jira] [Created] (CALCITE-2506) RexSimplify: coalesce(unaryPlus(nullInt), unaryPlus(vInt())) results in AssertionError: result mismatch

2018-08-29 Thread Vladimir Sitnikov (JIRA)
Vladimir Sitnikov created CALCITE-2506: -- Summary: RexSimplify: coalesce(unaryPlus(nullInt), unaryPlus(vInt())) results in AssertionError: result mismatch Key: CALCITE-2506 URL:

[jira] [Created] (CALCITE-2505) RexSimplify: isFalse(isNotDistinctFrom(vBool(0), vBool(1))) causes AssertionError: wrong operand count 1 for IS DISTINCT FROM

2018-08-29 Thread Vladimir Sitnikov (JIRA)
Vladimir Sitnikov created CALCITE-2505: -- Summary: RexSimplify: isFalse(isNotDistinctFrom(vBool(0), vBool(1))) causes AssertionError: wrong operand count 1 for IS DISTINCT FROM Key: CALCITE-2505 URL:

Re: JSON support

2018-08-29 Thread Michael Mior
One thing that jumped out to me was the use of an explicit type when calling the ArrayList constructor in the parser. I initially thought this was something that Julian had gotten rid of in his big update to support Java 8 syntax. However, I see this still persists in Parser.jj . Is this

Re: JSON support

2018-08-29 Thread Michael Mior
Thanks for surfacing this. I'll take a look now. -- Michael Mior mm...@apache.org Le mer. 29 août 2018 à 16:11, Julian Hyde a écrit : > Somehow I missed this… we have a pull request for JSON support. It’s a big > change (both in terms of importance and the amount of effort). > >

JSON support

2018-08-29 Thread Julian Hyde
Somehow I missed this… we have a pull request for JSON support. It’s a big change (both in terms of importance and the amount of effort). https://github.com/apache/calcite/pull/785 https://issues.apache.org/jira/browse/CALCITE-2266

Re: how to apply a rule using volcano planner?

2018-08-29 Thread Michael Mior
Which planner you use is generally going to depend on your goal in using the optimizer. HepPlanner applies a given list of optimization rules until none of those rules are applicable. VolcanoPlanner tries to estimate the cost of executing a query and explores applying different rules in an attempt

how to apply a rule using volcano planner?

2018-08-29 Thread Z. S.
Hi, I've been struggling to figure out how to do a very simple thing with calcite. Hook it to a database, pass a query to a query planner and get optimization rules applied to it. I couldn't find any documentation that shows start to end how to enable some rule and get a query optimized. What

Re: CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Vladimir Sitnikov
Julian>I think we should just solve problem 1 for now. Does that mean you agree to merge the PR? Julian>For 2, if we continue to write "No match found for function signature ABCDE(, , )” to the log it’s not perfect but it’s better than nothing. Why do you think this is the only logged message?

Re: CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Julian Hyde
Are you perhaps conflating two similar but different problems: 1. as a developer, it’s irritating how much stuff appears on the screen when I run tests; 2. as an administrator there is too much / too little / too much useless stuff in my logs. I think we should just solve problem 1 for now.

[jira] [Created] (CALCITE-2504) RexProgrammFuzzyTest: fuzzer for RexNodes

2018-08-29 Thread Vladimir Sitnikov (JIRA)
Vladimir Sitnikov created CALCITE-2504: -- Summary: RexProgrammFuzzyTest: fuzzer for RexNodes Key: CALCITE-2504 URL: https://issues.apache.org/jira/browse/CALCITE-2504 Project: Calcite

Re: Calcite contributions

2018-08-29 Thread Julian Hyde
It’s never going to be black and white. We’re never going to have a code of conduct that covers all cases. (But please, everyone go read the CoC if you have not read it recently: https://www.apache.org/foundation/policies/conduct.html .)

[jira] [Created] (CALCITE-2503) AvaticaCommonsHttpClientImpl client needs to set user-token on HttpClientContext before sending the request

2018-08-29 Thread Karan Mehta (JIRA)
Karan Mehta created CALCITE-2503: Summary: AvaticaCommonsHttpClientImpl client needs to set user-token on HttpClientContext before sending the request Key: CALCITE-2503 URL:

Re: joins and low selectivity optimization

2018-08-29 Thread Vladimir Sitnikov
>Nested loops are never likely to happe What's wrong with that? Apparently Andrei asks for that, and "subquery precomputation" is quite close to nested loops in my opinion. Vladimir

Re: joins and low selectivity optimization

2018-08-29 Thread Julian Hyde
Regarding Vladimir’s ideas of Bloom filters and nested loop joins. Both are excellent if you can do them. They are fairly easy in single-node architectures (especially single-threaded) but get harder in distributed architectures. Bloom filters (also magic sets) require data to be pushed “up

Re: Calcite contributions

2018-08-29 Thread Michael Mior
> I bet it is impossible to set "code of conduct" that makes everybody is happy Agreed, although we may be able to agree on a minimum standard. > Would you call me violent if I just commit the proper fix and ignore PR802? I don't think anyone was suggesting violence. > What if I have committed

Re: [DISCUSS] Towards Avatica-Go 3.1.0

2018-08-29 Thread Josh Elser
Sounds good! Will try to take it for a spin. On 8/28/18 7:05 PM, Francis Chuang wrote: Hi all, I'd like to start a vote for Avatica-Go 3.1.0 over the next few days. Some key things I'd like to address in this release: - Go 1.11 was released a few days ago and now includes support for

Re: joins and low selectivity optimization

2018-08-29 Thread Andrei Sereda
Hi Vladimir, Thanks for follow-up and explanation. I wanted to make sure I'm not missing (mis-understanding) anything. Andrei. On Wed, Aug 29, 2018 at 11:01 AM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > One of the approaches to such queries is to throw Bloom filters all over >

Re: Giving the Calcite logo some love

2018-08-29 Thread Michael Mior
Just a note since we're on the topic that whatever logos we come up with should be sure to have TM clearly indicated. -- Michael Mior mm...@apache.org Le mer. 29 août 2018 à 03:13, Julian Hyde a écrit : > Yes indeed! > > If someone feels inspired to produce a logo, here’s my suggestion of a

Re: joins and low selectivity optimization

2018-08-29 Thread Vladimir Sitnikov
One of the approaches to such queries is to throw Bloom filters all over the place. That is it could execute "small side" of the join, collect the ids (or a lossy version of it in a form of Bloom filters), and it could propagate that Bloom filter to the second source to reduce the set of rows

Re: joins and low selectivity optimization

2018-08-29 Thread Andrei Sereda
A follow-up question. I presume this is applicable equally to joins without predicates ? select *from t1 join t2 on (t1.id = t2.id) Even if t1 has a much lower cardinality than t2 (say many orders of magnitude), Calcite would not know to convert t2 query to: select * from t2 where id in (1,

Review request CALCITE-2444

2018-08-29 Thread Zoltan Haindrich
Hello Could someone please take a look at this small patch? It enables to unparse statements which contain IN expressions. https://issues.apache.org/jira/browse/CALCITE-2444 https://github.com/apache/calcite/pull/805 cheers, Zoltan

Re: CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Vladimir Sitnikov
>A sql validation error when a statement is being prepared (say by a jdbc server) is really an error, and I think it should be logged. Suppose there's an end-to-end data management system that happens to use Calcite. What action should system administrator take when the following error is

Re: Calcite contributions

2018-08-29 Thread Vladimir Sitnikov
Julian>If you had just said “Hey Zoltan, I think I’ve come up with a better fix than your PR; do you mind if I commit it?” then Zoltan would have said “Sure”. While I agree with general points (tough I bet it is impossible to set "code of conduct" that makes everybody is happy), however reality

Re: CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Julian Hyde
A sql validation error when a statement is being prepared (say by a jdbc server) is really an error, and I think it should be logged. However when such exceptions occur during tests such as SqlValidatorTest they are clearly not errors - they are expected behavior. So ideally they would not be

Re: Giving the Calcite logo some love

2018-08-29 Thread Julian Hyde
Yes indeed! If someone feels inspired to produce a logo, here’s my suggestion of a theme/image: a spider, specifically a Barn Spider (Araneus Cavaticus)[1]. It was the origin of the name “avatica”, connects and spins webs, and the eponymous individual in Charlotte’s Web had rather exceptional

[jira] [Created] (CALCITE-2502) Silence warnings from RexImplicationChecker

2018-08-29 Thread Vladimir Sitnikov (JIRA)
Vladimir Sitnikov created CALCITE-2502: -- Summary: Silence warnings from RexImplicationChecker Key: CALCITE-2502 URL: https://issues.apache.org/jira/browse/CALCITE-2502 Project: Calcite

CALCITE-2463 Silence ERROR logs from CalciteException, SqlValidatorException

2018-08-29 Thread Vladimir Sitnikov
Hi, I would like to hear if there are reasons not to merge CALCITE-2463/PR797 It is a trivial change, the build is green, and I see no comments (==> that sounds like an approval). The issue is CalciteException and SqlValidatorException always log, and it clutters build logs for no reason. The

how to validate a sql is optimize

2018-08-29 Thread 毛秀庆
when input a SQL, then output what is optimized by calcite ? how the code write ?