Re: [Question] Obtaining aliases for group columns in aggregate (especially after AGGREGATE_PROJECT_MERGE)

2021-06-25 Thread Sharma, Ishan
Hi Stamatis, Regarding aliases, there is no guarantee that they will be retained. > There are various places where there is some effort to keep them intact but > your code shouldn't rely on this. > Yeah, I took a closer look at the source code and what you are saying seems to make sense. I have

[jira] [Created] (CALCITE-4668) RelBuilder.join should only emit a correlate when a correlate variable exists

2021-06-25 Thread James Starr (Jira)
James Starr created CALCITE-4668: Summary: RelBuilder.join should only emit a correlate when a correlate variable exists Key: CALCITE-4668 URL: https://issues.apache.org/jira/browse/CALCITE-4668

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-25 Thread Vladimir Sitnikov
Vladimir, welcome! >consistent signal from the "field" - lack of documentation blocks I wonder if logging "missing sections" would help. The catch here is if you work with Calcite for some time the missing docs become a blind spot. For instance, once I heard that if one wants to add a test

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-25 Thread Julian Hyde
I agree there is a lack of documentation, and it is hurting us. One explanation is that there are no companies selling Calcite directly. (Compare, for example Druid, Hive and Cassandra.) If there were, those companies would employ technical writers to contribute documentation. On a related

Re: why do We use inner class for CallCopyingArgHandler within SqlShuttle rather static nested class as ArgHandlerImpl within SqlBasicVisitor.

2021-06-25 Thread Vladimir Sitnikov
Julian>I’m not a fan of dependency injection. But it requires mutable fields. On contrary, DI does not require mutable fields, and field injection is considered an anti-pattern in production code. For example, see https://github.com/google/guice/wiki/Injections#constructor-injection I do

Re: why do We use inner class for CallCopyingArgHandler within SqlShuttle rather static nested class as ArgHandlerImpl within SqlBasicVisitor.

2021-06-25 Thread Julian Hyde
> I find the CallCopyingArgHandler is not static, but the doc doesn't specify > the reason. > Does someone know why? If you try making it static you will see that it is unable to use the current shuttle to visit the children. CallCopyingArgHandler exists for a very short duration - visit of one

Re: Trait propagation guidelines

2021-06-25 Thread Haisheng Yuan
Hi Vladimir, Thank you for the detailed description, now we understand what you want. MaxCompute doesn't generate the plan you give, and should not. It will generate the following plan instead: Agg#[b,c]#HASH[b,c].[-1] Agg[a,b,c]#HASH[b,c].[-1] Exchange#HASH[b,c].[-1] Scan#ANY

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-25 Thread Vladimir Ozerov
Thank you, everybody! While I enjoy hacking Calcite's codebase, my colleagues and I observe a consistent signal from the "field" - lack of documentation blocks many attempts to integrate Apache Calcite. Engineers simply get lost with no idea on how to move forward. So I more and more believe that

Re: Trait propagation guidelines

2021-06-25 Thread Vladimir Ozerov
Hi Haisheng, Thank you for your answers and patience. Reading your answers, I have a feeling that I already follow the guidelines. However, I still see an issue with delayed trait resolution. Please let me repeat the example from one of the previous emails to demonstrate that problem that I

why do We use inner class for CallCopyingArgHandler within SqlShuttle rather static nested class as ArgHandlerImpl within SqlBasicVisitor.

2021-06-25 Thread Yanjing Wang
In my scenarios, I created some visitors for sql node to rewrite the sql, for example, rewriting all literals to generate a sql template. But I don't like many new constructors scattered somewhere. I like singleton and dependency injection. so I read SqlShuttle source code to look for the