[jira] [Comment Edited] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766039#comment-17766039 ] LakeShen edited comment on CALCITE-6009 at 9/17/23 5:11 AM: My idea is to

[jira] [Updated] (CALCITE-5994) Add the optimize for removing the redundant Sort when a sort's source row numer is less than 1

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-5994: -- Description: When a Sort's input source max row numer is 1,then we could remove the redundant

[jira] [Updated] (CALCITE-5994) Add the optimize for removing the redundant Sort when a sort's source row numer is less than 1

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-5994: -- Description: When a Sort's input source max row cnt is 1,then we could remove the redundant

[jira] [Updated] (CALCITE-5994) Add the optimize for removing the redundant Sort when a sort's source row numer is less than 1

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-5994: -- Summary: Add the optimize for removing the redundant Sort when a sort's source row numer is less

[jira] [Comment Edited] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766039#comment-17766039 ] LakeShen edited comment on CALCITE-6009 at 9/17/23 4:16 AM: My idea is to

[jira] [Commented] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766039#comment-17766039 ] LakeShen commented on CALCITE-6009: --- My idea is to add a new optimization rule called

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Description: In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`. When

[jira] [Commented] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766038#comment-17766038 ] LakeShen commented on CALCITE-6009: --- Thanks your advice,I've added a specific description. > Add the

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Description: In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`. When

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Description: In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`. When

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's source row number less than Limit's fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Summary: Add the optimize for removing the redundant Limit when a Limit's source row number less

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Description: In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`. When

[jira] [Updated] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-6009: -- Description: In calcite,Limit would be represented by Sort,such as `LogicalSort[fetch = 5]`. When

[jira] [Commented] (CALCITE-6007) Sqlwith as subquery without alias doesn't have correct alias setup

2023-09-16 Thread Julian Hyde (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766033#comment-17766033 ] Julian Hyde commented on CALCITE-6007: -- The problem is that the generated SQL is invalid. That

[jira] [Commented] (CALCITE-6008) ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-16 Thread Julian Hyde (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766032#comment-17766032 ] Julian Hyde commented on CALCITE-6008: -- Done. Please expand to include the other cases I listed

[jira] [Assigned] (CALCITE-6008) ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-16 Thread Julian Hyde (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde reassigned CALCITE-6008: Assignee: Jiabao Sun > ARRAY_AGG should returns ARRAY NULL when there's no input rows >

[jira] [Comment Edited] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch

2023-09-16 Thread Julian Hyde (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766031#comment-17766031 ] Julian Hyde edited comment on CALCITE-6009 at 9/16/23 11:21 PM: I don't

[jira] [Commented] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch

2023-09-16 Thread Julian Hyde (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766031#comment-17766031 ] Julian Hyde commented on CALCITE-6009: -- I don't think using abbreviations such as 'cnt' and 'max'

[jira] [Updated] (CALCITE-6008) ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-16 Thread ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6008: Labels: pull-request-available (was: ) > ARRAY_AGG should returns ARRAY NULL when

[jira] [Updated] (CALCITE-6008) ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-16 Thread Jiabao Sun (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jiabao Sun updated CALCITE-6008: Summary: ARRAY_AGG should returns ARRAY NULL when there's no input rows (was: ARRAY_AGG should

[jira] [Created] (CALCITE-6009) Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch

2023-09-16 Thread LakeShen (Jira)
LakeShen created CALCITE-6009: - Summary: Add the optimize for removing the redundant Limit when a Limit's input max row cnt less than limit fetch Key: CALCITE-6009 URL:

[jira] [Updated] (CALCITE-5845) Select a very large predicate throw threw 'java.lang.StackOverflowError' exception in SqlNode to RelNode phase

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-5845: -- Summary: Select a very large predicate throw threw 'java.lang.StackOverflowError' exception in

[jira] [Updated] (CALCITE-5994) Add the optimize for removing the redundant sort when a sort's input max row cnt is 1

2023-09-16 Thread LakeShen (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] LakeShen updated CALCITE-5994: -- Summary: Add the optimize for removing the redundant sort when a sort's input max row cnt is 1

[jira] [Updated] (CALCITE-6008) ARRAY_AGG should returns ARRAY nullable.

2023-09-16 Thread Jiabao Sun (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jiabao Sun updated CALCITE-6008: Affects Version/s: 1.35.0 > ARRAY_AGG should returns ARRAY nullable. >

[jira] [Commented] (CALCITE-6008) ARRAY_AGG should returns ARRAY nullable.

2023-09-16 Thread Jiabao Sun (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17765943#comment-17765943 ] Jiabao Sun commented on CALCITE-6008: - Hey [~julianhyde], could you help assign this ticket to me?

[jira] [Created] (CALCITE-6008) ARRAY_AGG should returns ARRAY nullable.

2023-09-16 Thread Jiabao Sun (Jira)
Jiabao Sun created CALCITE-6008: --- Summary: ARRAY_AGG should returns ARRAY nullable. Key: CALCITE-6008 URL: https://issues.apache.org/jira/browse/CALCITE-6008 Project: Calcite Issue Type: Bug

[jira] [Commented] (CALCITE-4335) Aggregate functions for BigQuery

2023-09-16 Thread Jiabao Sun (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17765942#comment-17765942 ] Jiabao Sun commented on CALCITE-4335: - Thanks [~julianhyde], I will create an issue and submit a PR

[jira] [Comment Edited] (CALCITE-6007) Sqlwith as subquery without alias doesn't have correct alias setup

2023-09-16 Thread Jiajun Xie (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17765921#comment-17765921 ] Jiajun Xie edited comment on CALCITE-6007 at 9/16/23 7:51 AM: --

[jira] [Commented] (CALCITE-6007) Sqlwith as subquery without alias doesn't have correct alias setup

2023-09-16 Thread Jiajun Xie (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17765921#comment-17765921 ] Jiajun Xie commented on CALCITE-6007: - [~wenruimeng] , Maybe `CTE` or `With  clause` will be better

[jira] [Comment Edited] (CALCITE-6007) Sqlwith as subquery without alias doesn't have correct alias setup

2023-09-16 Thread Jiajun Xie (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17765921#comment-17765921 ] Jiajun Xie edited comment on CALCITE-6007 at 9/16/23 7:50 AM: --