[jira] [Created] (CALCITE-5035) Define a rule of SortProjectPullUpConstantsRule to pull up constants project under Sort

2022-03-07 Thread Xurenhe (Jira)
Xurenhe created CALCITE-5035:


 Summary: Define a rule of SortProjectPullUpConstantsRule to pull 
up constants project under Sort
 Key: CALCITE-5035
 URL: https://issues.apache.org/jira/browse/CALCITE-5035
 Project: Calcite
  Issue Type: Improvement
Reporter: Xurenhe
Assignee: Xurenhe


Define a rule to pull up constants project under Sort

As we know, sorting by constant literal is meaningless.

After the predicates' optimizing, the element of sort may be a constant 
literal, as below:
{code:java}
-- sql
select pay_amount, pay_id, user_id
from pay_tbl
where pay_id = 1234
group by pay_amount, pay_id, user_id
order by pay_amount, pay_id, user_id

-- rel tree
-- after executing the rule of AggregateProjectPullUpConstantsRule
LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], 
dir2=[ASC])
  LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
    LogicalAggregate(group=[{0, 1}])
      LogicalProject(pay_amount=[$1], user_id=[$3])
        LogicalFilter(condition=[=($0, 1234)])
          LogicalTableScan(table=[[default, pay_tbl]]){code}
The field of pay_id in sort is a constant literal, it's meaningless for sort's 
operator.

So, we could optimize it as below:
{code:java}
-- optimized rel tree
LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
  LogicalSort(sort0=[$0], sort2=[$1], dir0=[ASC], dir2=[ASC])
    LogicalProject(pay_amount=[$0], user_id=[$1])
      LogicalAggregate(group=[{0, 1}])
        LogicalProject(pay_amount=[$1], user_id=[$3])
          LogicalFilter(condition=[=($0, 1234)])
            LogicalTableScan(table=[[default, pay_tbl]]) {code}
 

Related 
discussion:https://lists.apache.org/thread/bq1gn6o7279f6563njhd5ln2j5178nwm

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


RE: Re: Could calcite support SortProjectPullUpConstantsRule?

2022-03-07 Thread 徐仁和
Hi Julian
Thanks for your reply.
As you said, using
`org.apache.calcite.rel.metadata.RelMetadataQuery#getPulledUpPredicates` is
very  effective.
I will log a jira later.

Best
Xurenhe


On 2022/03/07 20:30:45 Julian Hyde wrote:
> Sounds reasonable. Please log a jira.
>
> Consider implementing this rule by inspecting predicates or unique keys,
rather than by matching a Project or Filter. If you can ascertain that a
sort column has only one value (counting NULL as a value for these
purposes) then you can remove it from the sort.
>
> I find that using metadata in this way is very effective. You get the
desired effect without moving relational operators around.
>
> Julian
>
> > On Mar 7, 2022, at 1:01 AM, 徐仁和  wrote:
> >
> > Hi community:
> >
> > Could calcite support the rule to pull up constant project from sort,
just
> > like `AggregateProjectPullUpConstantsRule`?
> >
> > -- sql
> > select pay_amount, pay_id, user_id
> > from pay_tbl
> > where pay_id = 1234
> > group by pay_amount, pay_id, user_id
> > order by pay_amount, pay_id, user_id
> >
> > -- origin rel tree
> > LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC],
> > dir2=[ASC])
> >  LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
> >LogicalAggregate(group=[{0, 1}])
> >  LogicalProject(pay_amount=[$1], user_id=[$3])
> >LogicalFilter(condition=[=($0, 1234)])
> >  LogicalTableScan(table=[[default, pay_tbl]])
> >
> > -- optimized rel tree
> > LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
> >  LogicalSort(sort0=[$0], sort2=[$1], dir0=[ASC], dir2=[ASC])
> >LogicalProject(pay_amount=[$0], user_id=[$1])
> >  LogicalAggregate(group=[{0, 1}])
> >LogicalProject(pay_amount=[$1], user_id=[$3])
> >  LogicalFilter(condition=[=($0, 1234)])
> >LogicalTableScan(table=[[default, pay_tbl]])
>


Re: Bugs dropped on the floor

2022-03-07 Thread Fan Liya
Hi Francis and Ruben,

Thanks for your kind help.
I have set the fix version of the following JIRAs to 1.31.0 (their original
fix version was 1.30.0). Please check.

CALCITE-5021
CALCITE-4992
CALCITE-4990
CALCITE-4987
CALCITE-4976
CALCITE-4913
CALCITE-4908
CALCITE-4887
CALCITE-2552

Best,
Liya Fan


Ruben Q L  于2022年3月8日周二 07:54写道:

> I have created version 1.31.0 myself, it should be already visible.
>
> Ruben
>
>
> On Mon, Mar 7, 2022 at 11:51 PM Francis Chuang 
> wrote:
>
> > Hey Liya,
> >
> > I've added you to the administrator role, so you should be able to
> > create the 1.31.0 release version in jira.
> >
> > Francis
> >
> > On 8/03/2022 10:44 am, Fan Liya wrote:
> > > Hi Ruben,
> > >
> > > Good suggestion. Thanks.
> > >
> > > I removed the fix version for above JIRAs because I could not assign
> > 1.31.0
> > > to them.
> > > Version 1.31.0 has not been created, and I have no permission to create
> > it.
> > > Could someone with permission please create it?
> > >
> > > Best,
> > > Liya Fan
> > >
> > >
> > > Fan Liya  于2022年3月8日周二 07:37写道:
> > >
> > >> Sorry. I will restore the fix-version.
> > >> It seems CALCITE-4976 is duplicate with CALCITE-5031. So I will close
> > >> CALCITE-5031.
> > >>
> > >> Best,
> > >> Liya Fan
> > >>
> > >>
> > >> Julian Hyde  于2022年3月8日周二 06:25写道:
> > >>
> > >>> Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
> > >>> https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
> > >>> literally “Release Calcite 1.30.0”, no longer has fix-version 1.30.
> > Good
> > >>> grief.
> > >>>
> > >>>
> >  On Mar 7, 2022, at 2:22 PM, Julian Hyde 
> > wrote:
> > 
> >  There were a few bugs that had fix-version = 1.30 because they had
> PRs
> > >>> that looked like they were going to make it. Liya has removed the fix
> > >>> version.
> > 
> >  https://issues.apache.org/jira/browse/CALCITE-4908 <
> > >>> https://issues.apache.org/jira/browse/CALCITE-4908>
> >  https://issues.apache.org/jira/browse/CALCITE-2552 <
> > >>> https://issues.apache.org/jira/browse/CALCITE-2552>
> >  https://issues.apache.org/jira/browse/CALCITE-4987 <
> > >>> https://issues.apache.org/jira/browse/CALCITE-4987>
> >  https://issues.apache.org/jira/browse/CALCITE-4913 <
> > >>> https://issues.apache.org/jira/browse/CALCITE-4913>
> > 
> >  Is that where we’re going to leave it?
> > 
> >  It breaks my heart that there we are ignoring good PRs.
> > 
> >  Julian
> > 
> > >>>
> > >>>
> > >
> >
>


Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 0)

2022-03-07 Thread Fan Liya
Hi Ruben,

Thanks for your suggestion. Let's go ahead with it.

Best,
Liya Fan


Ruben Q L  于2022年3月8日周二 07:49写道:

> Hello Liya Fan,
>
> please be aware that, normally, when there are issues ONLY on the release
> notes, we do not require a new RC (they can be amended afterwards with a
> commit right after the release).
> So, I'd say that for the moment we can just cancel RC0 vote (an email
> "[CANCEL] [VOTE] Release Apache Calcite1.30.0 (release candidate 0)" should
> be sent to make it official), and keep RC1 vote open.
>
> Best,
> Ruben
>
>
> On Mon, Mar 7, 2022 at 11:34 PM Fan Liya  wrote:
>
> > Hi Julian,
> >
> > Thanks for your feedback. I will prepare another build, after addressing
> > these issues.
> >
> > Best,
> > Liya Fan
> >
> >
> > Julian Hyde  于2022年3月8日周二 04:50写道:
> >
> > > Liya, in the next iteration can you go back to the usual sections e.g
> > > “Bug-fixes, API changes and minor enhancements”. Also remove the “Fix”
> > > prefix from messages.
> > >
> > > Quite a few cases, e.g “ Fix the problem that JDBC adapter incorrectly
> > > adds ORDER BY columns to the SELECT list of generated SQL query” are in
> > the
> > > gray area between bug and missing feature, and using the original
> message
> > > helps people make their own decision.
> > >
> > > I also think there’s value in putting changes to build and test in a
> > > separate section, as we used to do. But please move my “Fluent test
> > > fixtures” into the “new features” section - because it is a major new
> > > feature.
> > >
> > > Julian
> > >
> > > > On Mar 6, 2022, at 10:31 PM, Francis Chuang <
> francischu...@apache.org>
> > > wrote:
> > > >
> > > > Thanks so much Liya! Please cancel this vote by sending a [CANCEL]
> > > message as well, to formalize the cancellation of this vote.
> > > >
> > > > Francis
> > > >
> > > >> On 7/03/2022 5:27 pm, Fan Liya wrote:
> > > >> After some investigation, I could not resolve the 404 issue of the
> > > commit
> > > >> link (In my computer, it is not 404, but an error with XML format).
> > > >> So I have created a new build, which has resolved all the above
> issues
> > > >> (according to the test on my local computer).
> > > >> Let's start another vote based on the new build. Thanks.
> > > >> Best,
> > > >> Liya Fan
> > > >> Fan Liya  于2022年3月7日周一 09:53写道:
> > > >>> Thanks for your feedback, Francis.
> > > >>> I will check.
> > > >>>
> > > >>> Best,
> > > >>> Liya Fan
> > > >>>
> > > >>>
> > > >>> Francis Chuang  于2022年3月7日周一 09:36写道:
> > > >>>
> > >  Hey Liya,
> > > 
> > >  Thanks for being RM for this release.
> > > 
> > >  Can you check the commit to be voted upon?
> > > 
> > > 
> > >
> >
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> > >  returns a 404
> > > 
> > >  Also, tag calcite-1.30.0-rc0 points to a39b9bf
> > >  (
> https://github.com/apache/calcite/releases/tag/calcite-1.30.0-rc0
> > ),
> > >  which does not seem to be in the Calcite repository, see:
> > > 
> > > 
> > >
> >
> https://github.com/apache/calcite/commit/a39b9bf8b1cbab8f4462c41f6b4506753f859f96
> > > 
> > >  Thanks!
> > >  Francis
> > > 
> > >  On 5/03/2022 8:56 pm, Fan Liya wrote:
> > > > Hi all,
> > > >
> > > > I have created a build for Apache Calcite 1.30.0, release
> > > > candidate 0.
> > > >
> > > > Thanks to everyone who has contributed to this release.
> > > >
> > > > You can read the release notes here:
> > > >
> > > 
> > >
> >
> https://github.com/apache/calcite/blob/calcite-1.30.0-rc0/site/_docs/history.md
> > > >
> > > > The commit to be voted upon:
> > > >
> > > 
> > >
> >
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> > > >
> > > > Its hash is 28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> > > >
> > > > Tag:
> > > > https://github.com/apache/calcite/tree/calcite-1.30.0-rc0
> > > >
> > > > The artifacts to be voted on are located here:
> > > >
> > > 
> > >
> https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc0
> > > > (revision 52873)
> > > >
> > > > The hashes of the artifacts are as follows:
> > > >
> > > 
> > >
> >
> 339b279426abfc09a73b0daf94479127aa469b1cd3fa1b1cf0842f57d64daf0e080d4e85ccdd2d32032ed424a39388790743adf2aec869480612e37003eabfc5
> > > > *apache-calcite-1.30.0-src.tar.gz
> > > >
> > > > A staged Maven repository is available for review at:
> > > >
> > > 
> > >
> >
> https://repository.apache.org/content/repositories/orgapachecalcite-1148/org/apache/calcite/
> > > >
> > > > Release artifacts are signed with the following key:
> > > > https://people.apache.org/keys/committer/COMMITTER_ID.asc
> > > > https://www.apache.org/dist/calcite/KEYS
> > > >
> > > > To create the jars and test Apache Calcite: "gradle build"
> > > > 

Re: Allow Cascades driver invoking "derive" on the nodes produced by "passThrough"

2022-03-07 Thread Haisheng Yuan
Hi Vladimir,

If I understand it correctly, your concern is still about [1], right?
If it is, I think I have answered it in [2], perhaps it didn't jump into your 
inbox.

I am still not convinced that enforcing derivation on all rels is the only way 
to solve your concern.

If it is the other problem, can you give us a concrete example? So we can 
discuss and solve it.

Thanks,
Haisheng Yuan

[1] https://lists.apache.org/thread/4rcvlk1oprbnbgbnwl2s735p99h4vj80
[2] https://lists.apache.org/thread/s17tsj3pmccfrfvydnmv76btc3voxohj

On 2022/02/13 09:40:05 Roman Kondakov wrote:
> Hi Alessandro,
> 
> this problem was already discussed on dev-list [1] and we have a ticket 
> for this [2].
> 
> My concern is that many projects use Calcite as a Lego kit: they took 
> internal components of Calcite and combine them for building a custom 
> planning and execution pipeline. And sometimes downstream projects need 
> to change the default behavior of internal components to fit their 
> requirements or overcome the bug. So the idea of keeping even internal 
> components of Calcite "more public" is rather a good thing than the bad 
> one from my point of view.
> 
> Thank you.
> 
> [1] https://lists.apache.org/thread/cykl74dcphgow4790fwoc8frsjglz7n1
> 
> [2] https://issues.apache.org/jira/browse/CALCITE-4542
> 
> --
> Roman Kondakov
> 
> 
> On 11.02.2022 19:15, Alessandro Solimando wrote:
> > Hello everyone,
> > @Vladimir, +1 on the change introducing "enforceDerive()".
> >
> > @Roman, could you walk us through the limitations you found that forced you
> > to copy-paste the whole class?
> >
> > Maybe there is some middle ground for your problem(s) too, similar in
> > spirit to what Vladimir proposed for the other limitation.
> >
> > I am not against making the class more public if necessary, but it would be
> > nice to have a discussion here before going down that path.
> > If the discussion leads to a better design of the original class, all
> > projects would benefit from that.
> >
> > Best regards,
> > Alessandro
> >
> > On Fri, 11 Feb 2022 at 04:14, Roman Kondakov 
> > wrote:
> >
> >> Hi Vladimir,
> >>
> >> +1 for making the rule driver more public. We've faced similar problems
> >> in the downstream project. The solution was to copy and paste the
> >> TopDownRuleDrive code with small fixes since it was not possible to
> >> override the default behavior.
> >>
> >> --
> >> Roman Kondakov
> >>
> >>
> >> On 11.02.2022 02:50, Vladimir Ozerov wrote:
> >>> Hi,
> >>>
> >>> In the Cascades driver, it is possible to propagate the requests top-down
> >>> using the "passThrough", method and then notify parents bottom-up about
> >> the
> >>> concrete physical implementations of inputs using the "derive" method.
> >>>
> >>> In some optimizers, the valid parent node cannot be created before the
> >>> trait sets of inputs are known. An example is a custom distribution trait
> >>> that includes the number of shards in the system. The parent operator
> >> alone
> >>> may guess the distribution keys, but cannot know the number of input
> >>> shards. To mitigate this, you may create a "template" node with an
> >> infinite
> >>> cost from within the optimization rule that will propagate the
> >>> passThrough/drive calls but would never participate in the final plan.
> >>>
> >>> Currency, the top-down driver designed in a way that the nodes created
> >> from
> >>> the "passThrough" method are not notified on the "derive" stage. This
> >> leads
> >>> to the incomplete exploration of the search space. For example, the rule
> >>> may produce the node "A1.template" that will be converted into a normal
> >>> "A1" node in the derive phase. However, if the parent operator produced
> >>> "A2.template" from "A1.template" using pass-through mechanics, the
> >>> "A2.template" will never be notified about the concrete input traits,
> >>> possibly losing the optimal plan. This is especially painful in
> >> distributed
> >>> engines, where the number of shards is important for the placement of
> >>> Shuffle operators.
> >>>
> >>> It seems that the problem could be solved with relatively low effort. The
> >>> "derive" is not invoked on the nodes created from the "passThrough"
> >> method,
> >>> because such nodes are placed in the "passThroughCache" collection.
> >> Instead
> >>> of doing this unconditionally, we may introduce an additional predicate
> >>> that would selectively enforce "derive" on such nodes. For example, this
> >>> could be a default method in the PhysicalNode interface, like:
> >>>
> >>> interface PhysicalNode {
> >>> default boolean enforceDerive() { return false; }
> >>> }
> >>>
> >>> If there are no objections, I'll proceed with this change.
> >>>
> >>> Alternatively, we may make the TopDownRuleDriver more "public", so that
> >> the
> >>> user can extend it and decide within the driver whether to cache a
> >>> particular node or not.
> >>>
> >>> I would appreciate your feedback on the matter.
> >>>
> >>> Regards,
> >>> 

Re: Bugs dropped on the floor

2022-03-07 Thread Ruben Q L
I have created version 1.31.0 myself, it should be already visible.

Ruben


On Mon, Mar 7, 2022 at 11:51 PM Francis Chuang 
wrote:

> Hey Liya,
>
> I've added you to the administrator role, so you should be able to
> create the 1.31.0 release version in jira.
>
> Francis
>
> On 8/03/2022 10:44 am, Fan Liya wrote:
> > Hi Ruben,
> >
> > Good suggestion. Thanks.
> >
> > I removed the fix version for above JIRAs because I could not assign
> 1.31.0
> > to them.
> > Version 1.31.0 has not been created, and I have no permission to create
> it.
> > Could someone with permission please create it?
> >
> > Best,
> > Liya Fan
> >
> >
> > Fan Liya  于2022年3月8日周二 07:37写道:
> >
> >> Sorry. I will restore the fix-version.
> >> It seems CALCITE-4976 is duplicate with CALCITE-5031. So I will close
> >> CALCITE-5031.
> >>
> >> Best,
> >> Liya Fan
> >>
> >>
> >> Julian Hyde  于2022年3月8日周二 06:25写道:
> >>
> >>> Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
> >>> https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
> >>> literally “Release Calcite 1.30.0”, no longer has fix-version 1.30.
> Good
> >>> grief.
> >>>
> >>>
>  On Mar 7, 2022, at 2:22 PM, Julian Hyde 
> wrote:
> 
>  There were a few bugs that had fix-version = 1.30 because they had PRs
> >>> that looked like they were going to make it. Liya has removed the fix
> >>> version.
> 
>  https://issues.apache.org/jira/browse/CALCITE-4908 <
> >>> https://issues.apache.org/jira/browse/CALCITE-4908>
>  https://issues.apache.org/jira/browse/CALCITE-2552 <
> >>> https://issues.apache.org/jira/browse/CALCITE-2552>
>  https://issues.apache.org/jira/browse/CALCITE-4987 <
> >>> https://issues.apache.org/jira/browse/CALCITE-4987>
>  https://issues.apache.org/jira/browse/CALCITE-4913 <
> >>> https://issues.apache.org/jira/browse/CALCITE-4913>
> 
>  Is that where we’re going to leave it?
> 
>  It breaks my heart that there we are ignoring good PRs.
> 
>  Julian
> 
> >>>
> >>>
> >
>


Re: Bugs dropped on the floor

2022-03-07 Thread Francis Chuang

Hey Liya,

I've added you to the administrator role, so you should be able to 
create the 1.31.0 release version in jira.


Francis

On 8/03/2022 10:44 am, Fan Liya wrote:

Hi Ruben,

Good suggestion. Thanks.

I removed the fix version for above JIRAs because I could not assign 1.31.0
to them.
Version 1.31.0 has not been created, and I have no permission to create it.
Could someone with permission please create it?

Best,
Liya Fan


Fan Liya  于2022年3月8日周二 07:37写道:


Sorry. I will restore the fix-version.
It seems CALCITE-4976 is duplicate with CALCITE-5031. So I will close
CALCITE-5031.

Best,
Liya Fan


Julian Hyde  于2022年3月8日周二 06:25写道:


Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
literally “Release Calcite 1.30.0”, no longer has fix-version 1.30. Good
grief.



On Mar 7, 2022, at 2:22 PM, Julian Hyde  wrote:

There were a few bugs that had fix-version = 1.30 because they had PRs

that looked like they were going to make it. Liya has removed the fix
version.


https://issues.apache.org/jira/browse/CALCITE-4908 <

https://issues.apache.org/jira/browse/CALCITE-4908>

https://issues.apache.org/jira/browse/CALCITE-2552 <

https://issues.apache.org/jira/browse/CALCITE-2552>

https://issues.apache.org/jira/browse/CALCITE-4987 <

https://issues.apache.org/jira/browse/CALCITE-4987>

https://issues.apache.org/jira/browse/CALCITE-4913 <

https://issues.apache.org/jira/browse/CALCITE-4913>


Is that where we’re going to leave it?

It breaks my heart that there we are ignoring good PRs.

Julian








Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 0)

2022-03-07 Thread Ruben Q L
Hello Liya Fan,

please be aware that, normally, when there are issues ONLY on the release
notes, we do not require a new RC (they can be amended afterwards with a
commit right after the release).
So, I'd say that for the moment we can just cancel RC0 vote (an email
"[CANCEL] [VOTE] Release Apache Calcite1.30.0 (release candidate 0)" should
be sent to make it official), and keep RC1 vote open.

Best,
Ruben


On Mon, Mar 7, 2022 at 11:34 PM Fan Liya  wrote:

> Hi Julian,
>
> Thanks for your feedback. I will prepare another build, after addressing
> these issues.
>
> Best,
> Liya Fan
>
>
> Julian Hyde  于2022年3月8日周二 04:50写道:
>
> > Liya, in the next iteration can you go back to the usual sections e.g
> > “Bug-fixes, API changes and minor enhancements”. Also remove the “Fix”
> > prefix from messages.
> >
> > Quite a few cases, e.g “ Fix the problem that JDBC adapter incorrectly
> > adds ORDER BY columns to the SELECT list of generated SQL query” are in
> the
> > gray area between bug and missing feature, and using the original message
> > helps people make their own decision.
> >
> > I also think there’s value in putting changes to build and test in a
> > separate section, as we used to do. But please move my “Fluent test
> > fixtures” into the “new features” section - because it is a major new
> > feature.
> >
> > Julian
> >
> > > On Mar 6, 2022, at 10:31 PM, Francis Chuang 
> > wrote:
> > >
> > > Thanks so much Liya! Please cancel this vote by sending a [CANCEL]
> > message as well, to formalize the cancellation of this vote.
> > >
> > > Francis
> > >
> > >> On 7/03/2022 5:27 pm, Fan Liya wrote:
> > >> After some investigation, I could not resolve the 404 issue of the
> > commit
> > >> link (In my computer, it is not 404, but an error with XML format).
> > >> So I have created a new build, which has resolved all the above issues
> > >> (according to the test on my local computer).
> > >> Let's start another vote based on the new build. Thanks.
> > >> Best,
> > >> Liya Fan
> > >> Fan Liya  于2022年3月7日周一 09:53写道:
> > >>> Thanks for your feedback, Francis.
> > >>> I will check.
> > >>>
> > >>> Best,
> > >>> Liya Fan
> > >>>
> > >>>
> > >>> Francis Chuang  于2022年3月7日周一 09:36写道:
> > >>>
> >  Hey Liya,
> > 
> >  Thanks for being RM for this release.
> > 
> >  Can you check the commit to be voted upon?
> > 
> > 
> >
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> >  returns a 404
> > 
> >  Also, tag calcite-1.30.0-rc0 points to a39b9bf
> >  (https://github.com/apache/calcite/releases/tag/calcite-1.30.0-rc0
> ),
> >  which does not seem to be in the Calcite repository, see:
> > 
> > 
> >
> https://github.com/apache/calcite/commit/a39b9bf8b1cbab8f4462c41f6b4506753f859f96
> > 
> >  Thanks!
> >  Francis
> > 
> >  On 5/03/2022 8:56 pm, Fan Liya wrote:
> > > Hi all,
> > >
> > > I have created a build for Apache Calcite 1.30.0, release
> > > candidate 0.
> > >
> > > Thanks to everyone who has contributed to this release.
> > >
> > > You can read the release notes here:
> > >
> > 
> >
> https://github.com/apache/calcite/blob/calcite-1.30.0-rc0/site/_docs/history.md
> > >
> > > The commit to be voted upon:
> > >
> > 
> >
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> > >
> > > Its hash is 28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> > >
> > > Tag:
> > > https://github.com/apache/calcite/tree/calcite-1.30.0-rc0
> > >
> > > The artifacts to be voted on are located here:
> > >
> > 
> > https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc0
> > > (revision 52873)
> > >
> > > The hashes of the artifacts are as follows:
> > >
> > 
> >
> 339b279426abfc09a73b0daf94479127aa469b1cd3fa1b1cf0842f57d64daf0e080d4e85ccdd2d32032ed424a39388790743adf2aec869480612e37003eabfc5
> > > *apache-calcite-1.30.0-src.tar.gz
> > >
> > > A staged Maven repository is available for review at:
> > >
> > 
> >
> https://repository.apache.org/content/repositories/orgapachecalcite-1148/org/apache/calcite/
> > >
> > > Release artifacts are signed with the following key:
> > > https://people.apache.org/keys/committer/COMMITTER_ID.asc
> > > https://www.apache.org/dist/calcite/KEYS
> > >
> > > To create the jars and test Apache Calcite: "gradle build"
> > > (requires an appropriate Gradle/JDK installation)
> > >
> > > Please vote on releasing this package as Apache Calcite 1.30.0.
> > >
> > > The vote is open for the next 72 hours and passes if a majority of
> at
> > > least three +1 PMC votes are cast.
> > >
> > > [ ] +1 Release this package as Apache Calcite 1.30.0
> > > [ ]  0 I don't feel strongly about it, but I'm okay with the
> release
> > > [ ] -1 Do not 

Re: Bugs dropped on the floor

2022-03-07 Thread Fan Liya
Hi Ruben,

Good suggestion. Thanks.

I removed the fix version for above JIRAs because I could not assign 1.31.0
to them.
Version 1.31.0 has not been created, and I have no permission to create it.
Could someone with permission please create it?

Best,
Liya Fan


Fan Liya  于2022年3月8日周二 07:37写道:

> Sorry. I will restore the fix-version.
> It seems CALCITE-4976 is duplicate with CALCITE-5031. So I will close
> CALCITE-5031.
>
> Best,
> Liya Fan
>
>
> Julian Hyde  于2022年3月8日周二 06:25写道:
>
>> Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
>> https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
>> literally “Release Calcite 1.30.0”, no longer has fix-version 1.30. Good
>> grief.
>>
>>
>> > On Mar 7, 2022, at 2:22 PM, Julian Hyde  wrote:
>> >
>> > There were a few bugs that had fix-version = 1.30 because they had PRs
>> that looked like they were going to make it. Liya has removed the fix
>> version.
>> >
>> > https://issues.apache.org/jira/browse/CALCITE-4908 <
>> https://issues.apache.org/jira/browse/CALCITE-4908>
>> > https://issues.apache.org/jira/browse/CALCITE-2552 <
>> https://issues.apache.org/jira/browse/CALCITE-2552>
>> > https://issues.apache.org/jira/browse/CALCITE-4987 <
>> https://issues.apache.org/jira/browse/CALCITE-4987>
>> > https://issues.apache.org/jira/browse/CALCITE-4913 <
>> https://issues.apache.org/jira/browse/CALCITE-4913>
>> >
>> > Is that where we’re going to leave it?
>> >
>> > It breaks my heart that there we are ignoring good PRs.
>> >
>> > Julian
>> >
>>
>>


Re: Bugs dropped on the floor

2022-03-07 Thread Fan Liya
Sorry. I will restore the fix-version.
It seems CALCITE-4976 is duplicate with CALCITE-5031. So I will close
CALCITE-5031.

Best,
Liya Fan


Julian Hyde  于2022年3月8日周二 06:25写道:

> Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
> https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
> literally “Release Calcite 1.30.0”, no longer has fix-version 1.30. Good
> grief.
>
>
> > On Mar 7, 2022, at 2:22 PM, Julian Hyde  wrote:
> >
> > There were a few bugs that had fix-version = 1.30 because they had PRs
> that looked like they were going to make it. Liya has removed the fix
> version.
> >
> > https://issues.apache.org/jira/browse/CALCITE-4908 <
> https://issues.apache.org/jira/browse/CALCITE-4908>
> > https://issues.apache.org/jira/browse/CALCITE-2552 <
> https://issues.apache.org/jira/browse/CALCITE-2552>
> > https://issues.apache.org/jira/browse/CALCITE-4987 <
> https://issues.apache.org/jira/browse/CALCITE-4987>
> > https://issues.apache.org/jira/browse/CALCITE-4913 <
> https://issues.apache.org/jira/browse/CALCITE-4913>
> >
> > Is that where we’re going to leave it?
> >
> > It breaks my heart that there we are ignoring good PRs.
> >
> > Julian
> >
>
>


Re: Bugs dropped on the floor

2022-03-07 Thread Ruben Q L
Hello,

In the "Towards Calcite 1.30.0" thread, when Liya Fan suggested last Friday
for RC0, nobody objected or requested a delay to try to squeeze in any
pending PR.
We can set these tickets fix-version = 1.31 and aim for that version, which
should be out in 8 weeks (or sooner if required).

Regarding  https://issues.apache.org/jira/browse/CALCITE-4976 this was
probably a mistake. It seems there has been some misunderstanding, because
there are currently two tickets "Release Calcite 1.30.0": that one and also
https://issues.apache.org/jira/browse/CALCITE-5031, created by Liya Fan
later (probably following the release managing instructions, without
realizing that there was already a ticket for that purpose). Should we
close the newer ticket as a duplicate and keep the original one (re-setting
its fix-version = 1.30)?

Best,
Ruben


On Mon, Mar 7, 2022 at 10:25 PM Julian Hyde  wrote:

> Especially https://issues.apache.org/jira/browse/CALCITE-4976 <
> https://issues.apache.org/jira/browse/CALCITE-4976> whose title is
> literally “Release Calcite 1.30.0”, no longer has fix-version 1.30. Good
> grief.
>
>
> > On Mar 7, 2022, at 2:22 PM, Julian Hyde  wrote:
> >
> > There were a few bugs that had fix-version = 1.30 because they had PRs
> that looked like they were going to make it. Liya has removed the fix
> version.
> >
> > https://issues.apache.org/jira/browse/CALCITE-4908 <
> https://issues.apache.org/jira/browse/CALCITE-4908>
> > https://issues.apache.org/jira/browse/CALCITE-2552 <
> https://issues.apache.org/jira/browse/CALCITE-2552>
> > https://issues.apache.org/jira/browse/CALCITE-4987 <
> https://issues.apache.org/jira/browse/CALCITE-4987>
> > https://issues.apache.org/jira/browse/CALCITE-4913 <
> https://issues.apache.org/jira/browse/CALCITE-4913>
> >
> > Is that where we’re going to leave it?
> >
> > It breaks my heart that there we are ignoring good PRs.
> >
> > Julian
> >
>
>


Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 0)

2022-03-07 Thread Fan Liya
Hi Julian,

Thanks for your feedback. I will prepare another build, after addressing
these issues.

Best,
Liya Fan


Julian Hyde  于2022年3月8日周二 04:50写道:

> Liya, in the next iteration can you go back to the usual sections e.g
> “Bug-fixes, API changes and minor enhancements”. Also remove the “Fix”
> prefix from messages.
>
> Quite a few cases, e.g “ Fix the problem that JDBC adapter incorrectly
> adds ORDER BY columns to the SELECT list of generated SQL query” are in the
> gray area between bug and missing feature, and using the original message
> helps people make their own decision.
>
> I also think there’s value in putting changes to build and test in a
> separate section, as we used to do. But please move my “Fluent test
> fixtures” into the “new features” section - because it is a major new
> feature.
>
> Julian
>
> > On Mar 6, 2022, at 10:31 PM, Francis Chuang 
> wrote:
> >
> > Thanks so much Liya! Please cancel this vote by sending a [CANCEL]
> message as well, to formalize the cancellation of this vote.
> >
> > Francis
> >
> >> On 7/03/2022 5:27 pm, Fan Liya wrote:
> >> After some investigation, I could not resolve the 404 issue of the
> commit
> >> link (In my computer, it is not 404, but an error with XML format).
> >> So I have created a new build, which has resolved all the above issues
> >> (according to the test on my local computer).
> >> Let's start another vote based on the new build. Thanks.
> >> Best,
> >> Liya Fan
> >> Fan Liya  于2022年3月7日周一 09:53写道:
> >>> Thanks for your feedback, Francis.
> >>> I will check.
> >>>
> >>> Best,
> >>> Liya Fan
> >>>
> >>>
> >>> Francis Chuang  于2022年3月7日周一 09:36写道:
> >>>
>  Hey Liya,
> 
>  Thanks for being RM for this release.
> 
>  Can you check the commit to be voted upon?
> 
> 
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
>  returns a 404
> 
>  Also, tag calcite-1.30.0-rc0 points to a39b9bf
>  (https://github.com/apache/calcite/releases/tag/calcite-1.30.0-rc0),
>  which does not seem to be in the Calcite repository, see:
> 
> 
> https://github.com/apache/calcite/commit/a39b9bf8b1cbab8f4462c41f6b4506753f859f96
> 
>  Thanks!
>  Francis
> 
>  On 5/03/2022 8:56 pm, Fan Liya wrote:
> > Hi all,
> >
> > I have created a build for Apache Calcite 1.30.0, release
> > candidate 0.
> >
> > Thanks to everyone who has contributed to this release.
> >
> > You can read the release notes here:
> >
> 
> https://github.com/apache/calcite/blob/calcite-1.30.0-rc0/site/_docs/history.md
> >
> > The commit to be voted upon:
> >
> 
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> >
> > Its hash is 28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> >
> > Tag:
> > https://github.com/apache/calcite/tree/calcite-1.30.0-rc0
> >
> > The artifacts to be voted on are located here:
> >
> 
> https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc0
> > (revision 52873)
> >
> > The hashes of the artifacts are as follows:
> >
> 
> 339b279426abfc09a73b0daf94479127aa469b1cd3fa1b1cf0842f57d64daf0e080d4e85ccdd2d32032ed424a39388790743adf2aec869480612e37003eabfc5
> > *apache-calcite-1.30.0-src.tar.gz
> >
> > A staged Maven repository is available for review at:
> >
> 
> https://repository.apache.org/content/repositories/orgapachecalcite-1148/org/apache/calcite/
> >
> > Release artifacts are signed with the following key:
> > https://people.apache.org/keys/committer/COMMITTER_ID.asc
> > https://www.apache.org/dist/calcite/KEYS
> >
> > To create the jars and test Apache Calcite: "gradle build"
> > (requires an appropriate Gradle/JDK installation)
> >
> > Please vote on releasing this package as Apache Calcite 1.30.0.
> >
> > The vote is open for the next 72 hours and passes if a majority of at
> > least three +1 PMC votes are cast.
> >
> > [ ] +1 Release this package as Apache Calcite 1.30.0
> > [ ]  0 I don't feel strongly about it, but I'm okay with the release
> > [ ] -1 Do not release this package because...
> >
> > Here is my vote:
> >
> > +1 (binding)
> >
> > Best,
> > Liya Fan
> >
> 
> >>>
>


Re: Bugs dropped on the floor

2022-03-07 Thread Julian Hyde
Especially https://issues.apache.org/jira/browse/CALCITE-4976 
 whose title is literally 
“Release Calcite 1.30.0”, no longer has fix-version 1.30. Good grief.


> On Mar 7, 2022, at 2:22 PM, Julian Hyde  wrote:
> 
> There were a few bugs that had fix-version = 1.30 because they had PRs that 
> looked like they were going to make it. Liya has removed the fix version.
> 
> https://issues.apache.org/jira/browse/CALCITE-4908 
> 
> https://issues.apache.org/jira/browse/CALCITE-2552 
>  
> https://issues.apache.org/jira/browse/CALCITE-4987 
>  
> https://issues.apache.org/jira/browse/CALCITE-4913 
>  
> 
> Is that where we’re going to leave it?
> 
> It breaks my heart that there we are ignoring good PRs.
> 
> Julian
> 



Bugs dropped on the floor

2022-03-07 Thread Julian Hyde
There were a few bugs that had fix-version = 1.30 because they had PRs that 
looked like they were going to make it. Liya has removed the fix version.

https://issues.apache.org/jira/browse/CALCITE-4908 

https://issues.apache.org/jira/browse/CALCITE-2552 
 
https://issues.apache.org/jira/browse/CALCITE-4987 
 
https://issues.apache.org/jira/browse/CALCITE-4913 
 

Is that where we’re going to leave it?

It breaks my heart that there we are ignoring good PRs.

Julian



Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 0)

2022-03-07 Thread Julian Hyde
Liya, in the next iteration can you go back to the usual sections e.g 
“Bug-fixes, API changes and minor enhancements”. Also remove the “Fix” prefix 
from messages.

Quite a few cases, e.g “ Fix the problem that JDBC adapter incorrectly adds 
ORDER BY columns to the SELECT list of generated SQL query” are in the gray 
area between bug and missing feature, and using the original message helps 
people make their own decision. 

I also think there’s value in putting changes to build and test in a separate 
section, as we used to do. But please move my “Fluent test fixtures” into the 
“new features” section - because it is a major new feature. 
  
Julian

> On Mar 6, 2022, at 10:31 PM, Francis Chuang  wrote:
> 
> Thanks so much Liya! Please cancel this vote by sending a [CANCEL] message 
> as well, to formalize the cancellation of this vote.
> 
> Francis
> 
>> On 7/03/2022 5:27 pm, Fan Liya wrote:
>> After some investigation, I could not resolve the 404 issue of the commit
>> link (In my computer, it is not 404, but an error with XML format).
>> So I have created a new build, which has resolved all the above issues
>> (according to the test on my local computer).
>> Let's start another vote based on the new build. Thanks.
>> Best,
>> Liya Fan
>> Fan Liya  于2022年3月7日周一 09:53写道:
>>> Thanks for your feedback, Francis.
>>> I will check.
>>> 
>>> Best,
>>> Liya Fan
>>> 
>>> 
>>> Francis Chuang  于2022年3月7日周一 09:36写道:
>>> 
 Hey Liya,
 
 Thanks for being RM for this release.
 
 Can you check the commit to be voted upon?
 
 https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
 returns a 404
 
 Also, tag calcite-1.30.0-rc0 points to a39b9bf
 (https://github.com/apache/calcite/releases/tag/calcite-1.30.0-rc0),
 which does not seem to be in the Calcite repository, see:
 
 https://github.com/apache/calcite/commit/a39b9bf8b1cbab8f4462c41f6b4506753f859f96
 
 Thanks!
 Francis
 
 On 5/03/2022 8:56 pm, Fan Liya wrote:
> Hi all,
> 
> I have created a build for Apache Calcite 1.30.0, release
> candidate 0.
> 
> Thanks to everyone who has contributed to this release.
> 
> You can read the release notes here:
> 
 https://github.com/apache/calcite/blob/calcite-1.30.0-rc0/site/_docs/history.md
> 
> The commit to be voted upon:
> 
 https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> 
> Its hash is 28aacc0bbccfbcd821fece72ae3d92f6c1db8a5e
> 
> Tag:
> https://github.com/apache/calcite/tree/calcite-1.30.0-rc0
> 
> The artifacts to be voted on are located here:
> 
 https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc0
> (revision 52873)
> 
> The hashes of the artifacts are as follows:
> 
 339b279426abfc09a73b0daf94479127aa469b1cd3fa1b1cf0842f57d64daf0e080d4e85ccdd2d32032ed424a39388790743adf2aec869480612e37003eabfc5
> *apache-calcite-1.30.0-src.tar.gz
> 
> A staged Maven repository is available for review at:
> 
 https://repository.apache.org/content/repositories/orgapachecalcite-1148/org/apache/calcite/
> 
> Release artifacts are signed with the following key:
> https://people.apache.org/keys/committer/COMMITTER_ID.asc
> https://www.apache.org/dist/calcite/KEYS
> 
> To create the jars and test Apache Calcite: "gradle build"
> (requires an appropriate Gradle/JDK installation)
> 
> Please vote on releasing this package as Apache Calcite 1.30.0.
> 
> The vote is open for the next 72 hours and passes if a majority of at
> least three +1 PMC votes are cast.
> 
> [ ] +1 Release this package as Apache Calcite 1.30.0
> [ ]  0 I don't feel strongly about it, but I'm okay with the release
> [ ] -1 Do not release this package because...
> 
> Here is my vote:
> 
> +1 (binding)
> 
> Best,
> Liya Fan
> 
 
>>> 


Re: Could calcite support SortProjectPullUpConstantsRule?

2022-03-07 Thread Julian Hyde
Sounds reasonable. Please log a jira. 

Consider implementing this rule by inspecting predicates or unique keys, rather 
than by matching a Project or Filter. If you can ascertain that a sort column 
has only one value (counting NULL as a value for these purposes) then you can 
remove it from the sort. 

I find that using metadata in this way is very effective. You get the desired 
effect without moving relational operators around. 

Julian

> On Mar 7, 2022, at 1:01 AM, 徐仁和  wrote:
> 
> Hi community:
> 
> Could calcite support the rule to pull up constant project from sort, just
> like `AggregateProjectPullUpConstantsRule`?
> 
> -- sql
> select pay_amount, pay_id, user_id
> from pay_tbl
> where pay_id = 1234
> group by pay_amount, pay_id, user_id
> order by pay_amount, pay_id, user_id
> 
> -- origin rel tree
> LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC],
> dir2=[ASC])
>  LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
>LogicalAggregate(group=[{0, 1}])
>  LogicalProject(pay_amount=[$1], user_id=[$3])
>LogicalFilter(condition=[=($0, 1234)])
>  LogicalTableScan(table=[[default, pay_tbl]])
> 
> -- optimized rel tree
> LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
>  LogicalSort(sort0=[$0], sort2=[$1], dir0=[ASC], dir2=[ASC])
>LogicalProject(pay_amount=[$0], user_id=[$1])
>  LogicalAggregate(group=[{0, 1}])
>LogicalProject(pay_amount=[$1], user_id=[$3])
>  LogicalFilter(condition=[=($0, 1234)])
>LogicalTableScan(table=[[default, pay_tbl]])


Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 1)

2022-03-07 Thread Enrico Olivelli
+1 (non binding)

Run all tests of HerdDB, all tests are passing without any code
change. (https://github.com/diennea/herddb/pull/779)

I would like to note that previous tests of HerdDB did not pass with
1.29.0 (and we were stuck to 1.28.0). With 1.29.0 tests on Github
actions hang during some classloading of some Calcite classes

thank you Liya

Enrico

Il giorno lun 7 mar 2022 alle ore 09:20 Fan Liya
 ha scritto:
>
> Hi Xiong,
>
> Thanks for your feedback. I will change the logs in a follow up MR.
>
> Best,
> Liya Fan
>
>
> xiong duan  于2022年3月7日周一 15:30写道:
>
> > Hi, Liya Fan.Thanks for your work.  +1.
> > Just a little problem:
> > I noticed the Bug-fixes logs all started with FixI think maybe we
> > should stay the same as JIRA summary or PR commit?
> >
> > Fan Liya  于2022年3月7日周一 14:55写道:
> >
> > > Hi all,
> > >
> > > I have created a build for Apache Calcite 1.30.0, release
> > > candidate 1.
> > >
> > > Thanks to everyone who has contributed to this release.
> > >
> > > You can read the release notes here:
> > >
> > >
> > https://github.com/apache/calcite/blob/calcite-1.30.0-rc1/site/_docs/history.md
> > >
> > > The commit to be voted upon:
> > >
> > >
> > https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=f14cf4c32b9079984a988bbad40230aa6a59b127
> > >
> > > Its hash is f14cf4c32b9079984a988bbad40230aa6a59b127
> > >
> > > Tag:
> > > https://github.com/apache/calcite/tree/calcite-1.30.0-rc1
> > >
> > > The artifacts to be voted on are located here:
> > > https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc1
> > > (revision 52897)
> > >
> > > The hashes of the artifacts are as follows:
> > >
> > >
> > 25527b5dfd3c28d4ac3c9d9a40b94dbcbce7feb17cc198ebe7c36a30c2df69a27ee5e4defab4edff1e1bc65c076bd0725bd8c378913d1d23f3d80f732e3e097f
> > > *apache-calcite-1.30.0-src.tar.gz
> > >
> > > A staged Maven repository is available for review at:
> > >
> > >
> > https://repository.apache.org/content/repositories/orgapachecalcite-1150/org/apache/calcite/
> > >
> > > Release artifacts are signed with the following key:
> > > https://people.apache.org/keys/committer/COMMITTER_ID.asc
> > > https://www.apache.org/dist/calcite/KEYS
> > >
> > > To create the jars and test Apache Calcite: "gradle build"
> > > (requires an appropriate Gradle/JDK installation)
> > >
> > > Please vote on releasing this package as Apache Calcite 1.30.0.
> > >
> > > The vote is open for the next 72 hours and passes if a majority of at
> > > least three +1 PMC votes are cast.
> > >
> > > [ ] +1 Release this package as Apache Calcite 1.30.0
> > > [ ]  0 I don't feel strongly about it, but I'm okay with the release
> > > [ ] -1 Do not release this package because...
> > >
> > > Here is my vote:
> > >
> > > +1 (binding)
> > >
> > > Best,
> > > Liya Fan
> > >
> >


Could calcite support SortProjectPullUpConstantsRule?

2022-03-07 Thread 徐仁和
Hi community:

Could calcite support the rule to pull up constant project from sort, just
like `AggregateProjectPullUpConstantsRule`?

-- sql
select pay_amount, pay_id, user_id
from pay_tbl
where pay_id = 1234
group by pay_amount, pay_id, user_id
order by pay_amount, pay_id, user_id

-- origin rel tree
LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC],
dir2=[ASC])
  LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
LogicalAggregate(group=[{0, 1}])
  LogicalProject(pay_amount=[$1], user_id=[$3])
LogicalFilter(condition=[=($0, 1234)])
  LogicalTableScan(table=[[default, pay_tbl]])

-- optimized rel tree
LogicalProject(pay_amount=[$0], pay_id=[1234], user_id=[$1])
  LogicalSort(sort0=[$0], sort2=[$1], dir0=[ASC], dir2=[ASC])
LogicalProject(pay_amount=[$0], user_id=[$1])
  LogicalAggregate(group=[{0, 1}])
LogicalProject(pay_amount=[$1], user_id=[$3])
  LogicalFilter(condition=[=($0, 1234)])
LogicalTableScan(table=[[default, pay_tbl]])


Re: [VOTE] Release Apache Calcite 1.30.0 (release candidate 1)

2022-03-07 Thread Fan Liya
Hi Xiong,

Thanks for your feedback. I will change the logs in a follow up MR.

Best,
Liya Fan


xiong duan  于2022年3月7日周一 15:30写道:

> Hi, Liya Fan.Thanks for your work.  +1.
> Just a little problem:
> I noticed the Bug-fixes logs all started with FixI think maybe we
> should stay the same as JIRA summary or PR commit?
>
> Fan Liya  于2022年3月7日周一 14:55写道:
>
> > Hi all,
> >
> > I have created a build for Apache Calcite 1.30.0, release
> > candidate 1.
> >
> > Thanks to everyone who has contributed to this release.
> >
> > You can read the release notes here:
> >
> >
> https://github.com/apache/calcite/blob/calcite-1.30.0-rc1/site/_docs/history.md
> >
> > The commit to be voted upon:
> >
> >
> https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=f14cf4c32b9079984a988bbad40230aa6a59b127
> >
> > Its hash is f14cf4c32b9079984a988bbad40230aa6a59b127
> >
> > Tag:
> > https://github.com/apache/calcite/tree/calcite-1.30.0-rc1
> >
> > The artifacts to be voted on are located here:
> > https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-1.30.0-rc1
> > (revision 52897)
> >
> > The hashes of the artifacts are as follows:
> >
> >
> 25527b5dfd3c28d4ac3c9d9a40b94dbcbce7feb17cc198ebe7c36a30c2df69a27ee5e4defab4edff1e1bc65c076bd0725bd8c378913d1d23f3d80f732e3e097f
> > *apache-calcite-1.30.0-src.tar.gz
> >
> > A staged Maven repository is available for review at:
> >
> >
> https://repository.apache.org/content/repositories/orgapachecalcite-1150/org/apache/calcite/
> >
> > Release artifacts are signed with the following key:
> > https://people.apache.org/keys/committer/COMMITTER_ID.asc
> > https://www.apache.org/dist/calcite/KEYS
> >
> > To create the jars and test Apache Calcite: "gradle build"
> > (requires an appropriate Gradle/JDK installation)
> >
> > Please vote on releasing this package as Apache Calcite 1.30.0.
> >
> > The vote is open for the next 72 hours and passes if a majority of at
> > least three +1 PMC votes are cast.
> >
> > [ ] +1 Release this package as Apache Calcite 1.30.0
> > [ ]  0 I don't feel strongly about it, but I'm okay with the release
> > [ ] -1 Do not release this package because...
> >
> > Here is my vote:
> >
> > +1 (binding)
> >
> > Best,
> > Liya Fan
> >
>