[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-25 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17092313#comment-17092313 ] Vineet Garg commented on CALCITE-3952: -- I have updated the pull request. Appreciate your feedback.

[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-23 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17090994#comment-17090994 ] Vineet Garg commented on CALCITE-3952: -- bq. Given a rel which emit at most 1 row

[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-23 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17090992#comment-17090992 ] Vineet Garg commented on CALCITE-3952: -- Thanks for the feedback [~julianhyde]. I have few

[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-22 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17090238#comment-17090238 ] Vineet Garg commented on CALCITE-3952: -- No problem [~hyuan] :) It looks like calcite doesn't

[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-22 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17090222#comment-17090222 ] Vineet Garg commented on CALCITE-3952: -- BTW do you know how can I add test to {{RelOptRulesTest}}?

[jira] [Commented] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-22 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17090219#comment-17090219 ] Vineet Garg commented on CALCITE-3952: -- [~hyuan] In that case we shouldn't remove the sort. In

[jira] [Created] (CALCITE-3952) Improve SortRemoveRule to remove Sort based on rowcount

2020-04-22 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3952: Summary: Improve SortRemoveRule to remove Sort based on rowcount Key: CALCITE-3952 URL: https://issues.apache.org/jira/browse/CALCITE-3952 Project: Calcite

[jira] [Updated] (CALCITE-3928) Canonicalization doesn't do field trimming before materialized view matching

2020-04-19 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-3928: - Labels: materializedviews (was: ) > Canonicalization doesn't do field trimming before

[jira] [Commented] (CALCITE-3928) Canonicalization doesn't do field trimming before materialized view matching

2020-04-19 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087322#comment-17087322 ] Vineet Garg commented on CALCITE-3928: -- [~jinxing6...@126.com] Can you provide the actual query or

[jira] [Commented] (CALCITE-3918) SubQueryFilterRemoveRule failed to decorrelate subquery for TPCH q17

2020-04-19 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087319#comment-17087319 ] Vineet Garg commented on CALCITE-3918: -- SubQueryFilterRemoveRule can not decorrelate the plan. It

[jira] [Commented] (CALCITE-3918) SubQueryFilterRemoveRule failed to decorrelate subquery for TPCH q17

2020-04-19 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087316#comment-17087316 ] Vineet Garg commented on CALCITE-3918: -- Thanks [~hyuan]. I am confused about this. If you disable

[jira] [Commented] (CALCITE-3918) SubQueryFilterRemoveRule failed to decorrelate subquery for TPCH q17

2020-04-19 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087313#comment-17087313 ] Vineet Garg commented on CALCITE-3918: -- [~hyuan] How do I disable the RelDecorrelator for this

[jira] [Created] (CALCITE-3914) Improve SubsitutionVisitor to consider RexCall of type PLUS and TIMES for canonicalization

2020-04-10 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3914: Summary: Improve SubsitutionVisitor to consider RexCall of type PLUS and TIMES for canonicalization Key: CALCITE-3914 URL: https://issues.apache.org/jira/browse/CALCITE-3914

[jira] [Commented] (CALCITE-3890) Infer IS NOT NULL predicate from join

2020-04-01 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17073268#comment-17073268 ] Vineet Garg commented on CALCITE-3890: -- As [~kgyrtkirk] pointed out we have doing this in Hive for

[jira] [Updated] (CALCITE-3862) Rewriting for materialized view consisting of group by on join keys with aggregate fails

2020-03-15 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-3862: - Description: *Repro* {code:sql} +sql("select \"deptno\", \"empid\", \"salary\", sum(1) " +

[jira] [Created] (CALCITE-3862) Rewriting for materialized view consisting of group by on join keys with aggregate fails

2020-03-15 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3862: Summary: Rewriting for materialized view consisting of group by on join keys with aggregate fails Key: CALCITE-3862 URL: https://issues.apache.org/jira/browse/CALCITE-3862

[jira] [Commented] (CALCITE-3848) Materialized view rewriting fails for mv consisting of group by on join keys

2020-03-09 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17055459#comment-17055459 ] Vineet Garg commented on CALCITE-3848: -- [~jcamachorodriguez] can you take a look please? >

[jira] [Commented] (CALCITE-3848) Materialized view rewriting fails for mv consisting of group by on join keys

2020-03-09 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17055457#comment-17055457 ] Vineet Garg commented on CALCITE-3848: -- Please ignore the first pull request #1851 > Materialized

[jira] [Updated] (CALCITE-3848) Materialized view rewriting fails for mv consisting of group by on join keys

2020-03-09 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-3848: - Description: Test case {code:java} + @Test public void testAggregateOnJoinKeys() { +

[jira] [Created] (CALCITE-3848) Materialized view rewriting fails for mv consisting of group by on join keys

2020-03-09 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3848: Summary: Materialized view rewriting fails for mv consisting of group by on join keys Key: CALCITE-3848 URL: https://issues.apache.org/jira/browse/CALCITE-3848

[jira] [Commented] (CALCITE-3824) JoinProjectTransposeRule should skip Projects containing windowing expression

2020-02-28 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17047901#comment-17047901 ] Vineet Garg commented on CALCITE-3824: -- That sounds ok to me, we can keep the pull request closed.

[jira] [Commented] (CALCITE-3824) JoinProjectTransposeRule should skip Projects containing windowing expression

2020-02-28 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17047860#comment-17047860 ] Vineet Garg commented on CALCITE-3824: -- [~jcamachorodriguez] Pull request for this jira is closed,

[jira] [Commented] (CALCITE-3824) JoinProjectTransposeRule should skip Projects containing windowing expression

2020-02-25 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17045077#comment-17045077 ] Vineet Garg commented on CALCITE-3824: -- [~jcamachorodriguez] Did you mean to close CALCITE-3734

[jira] [Created] (CALCITE-3824) JoinProjectTransposeRule should skip Projects containing windowing expression

2020-02-25 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3824: Summary: JoinProjectTransposeRule should skip Projects containing windowing expression Key: CALCITE-3824 URL: https://issues.apache.org/jira/browse/CALCITE-3824

[jira] [Commented] (CALCITE-3734) MySQL JDBC rewrite is producing queries with CHAR with range beyond 255

2020-02-25 Thread Vineet Garg (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044870#comment-17044870 ] Vineet Garg commented on CALCITE-3734: -- bq. let's add a mechanism to add per-provider,

[jira] [Created] (CALCITE-3734) MySQL JDBC rewrite is producing queries with CHAR with range beyond 255

2020-01-14 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3734: Summary: MySQL JDBC rewrite is producing queries with CHAR with range beyond 255 Key: CALCITE-3734 URL: https://issues.apache.org/jira/browse/CALCITE-3734 Project:

[jira] [Created] (CALCITE-3733) MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME

2020-01-14 Thread Vineet Garg (Jira)
Vineet Garg created CALCITE-3733: Summary: MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME Key: CALCITE-3733 URL: https://issues.apache.org/jira/browse/CALCITE-3733 Project:

[jira] [Commented] (CALCITE-3031) Support for correlated ANY/SOME/ALL sub-query

2019-07-31 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897627#comment-16897627 ] Vineet Garg commented on CALCITE-3031: -- [~julianhyde] I have created CALCITE-3222 to fix these

[jira] [Created] (CALCITE-3222) Fix code style issues introduced by CALCITE-3031

2019-07-31 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-3222: Summary: Fix code style issues introduced by CALCITE-3031 Key: CALCITE-3222 URL: https://issues.apache.org/jira/browse/CALCITE-3222 Project: Calcite Issue

[jira] [Commented] (CALCITE-3031) Support for correlated ANY/SOME/ALL sub-query

2019-07-20 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16889587#comment-16889587 ] Vineet Garg commented on CALCITE-3031: -- [~hyuan] [~julianhyde] Can you take a look please? >

[jira] [Commented] (CALCITE-3031) Support for correlated ANY/SOME/ALL sub-query

2019-07-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16887416#comment-16887416 ] Vineet Garg commented on CALCITE-3031: -- [~julianhyde] I have updated the Jira title as well as

[jira] [Updated] (CALCITE-3031) Support for correlated ANY/SOME/ALL sub-query

2019-07-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-3031: - Summary: Support for correlated ANY/SOME/ALL sub-query (was: AssertionError: correlation id

[jira] [Commented] (CALCITE-3031) AssertionError: correlation id $cor0 not found in correlation list []

2019-07-16 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16886652#comment-16886652 ] Vineet Garg commented on CALCITE-3031: -- Pull request is available at

[jira] [Commented] (CALCITE-3132) Simply expressions in LogicalFilter generated for subqueries with quantified predicate

2019-06-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866077#comment-16866077 ] Vineet Garg commented on CALCITE-3132: -- [~hyuan] You are correct. Since this happens to be COUNT

[jira] [Commented] (CALCITE-3132) Simply expressions in LogicalFilter generated for subqueries with quantified predicate

2019-06-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866063#comment-16866063 ] Vineet Garg commented on CALCITE-3132: -- [~hyuan] I believe since this condition is part of

[jira] [Created] (CALCITE-3132) Simply expressions in LogicalFilter generated for subqueries with quantified predicate

2019-06-17 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-3132: Summary: Simply expressions in LogicalFilter generated for subqueries with quantified predicate Key: CALCITE-3132 URL: https://issues.apache.org/jira/browse/CALCITE-3132

[jira] [Commented] (CALCITE-3028) Support FULL OUTER JOIN with AggregateJoinTransposeRule

2019-05-16 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16841568#comment-16841568 ] Vineet Garg commented on CALCITE-3028: -- Thanks [~hyuan] > Support FULL OUTER JOIN with

[jira] [Commented] (CALCITE-3031) AssertionError: correlation id $cor0 not found in correlation list []

2019-04-29 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16829819#comment-16829819 ] Vineet Garg commented on CALCITE-3031: -- [~hyuan] Support for correlated quantified predicates was

[jira] [Created] (CALCITE-3028) Support FULL OUTER JOIN with AggregateJoinTransposeRule

2019-04-27 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-3028: Summary: Support FULL OUTER JOIN with AggregateJoinTransposeRule Key: CALCITE-3028 URL: https://issues.apache.org/jira/browse/CALCITE-3028 Project: Calcite

[jira] [Commented] (CALCITE-1624) Inefficient plan for NOT IN correlated subqueries

2019-04-19 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822248#comment-16822248 ] Vineet Garg commented on CALCITE-1624: -- [~danny0405] The plan looks correct to me. {{IS NOT

[jira] [Commented] (CALCITE-3011) Support outer joins with AggregateJoinTransposeRule

2019-04-19 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822147#comment-16822147 ] Vineet Garg commented on CALCITE-3011: -- [~jcamachorodriguez], [~hyuan] I have updated the pull

[jira] [Created] (CALCITE-3012) areColumnsUnique for FULL OUTER JOIN could return wrong answer when ignoreNulls is false

2019-04-19 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-3012: Summary: areColumnsUnique for FULL OUTER JOIN could return wrong answer when ignoreNulls is false Key: CALCITE-3012 URL: https://issues.apache.org/jira/browse/CALCITE-3012

[jira] [Commented] (CALCITE-3011) Support outer joins with AggregateJoinTransposeRule

2019-04-18 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16821473#comment-16821473 ] Vineet Garg commented on CALCITE-3011: -- Fixing this issue in {{AggregateJoinTransposeRule}}

[jira] [Commented] (CALCITE-3011) Support outer joins with AggregateJoinTransposeRule

2019-04-18 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16821331#comment-16821331 ] Vineet Garg commented on CALCITE-3011: -- Found a bug with full outer join. {code:sql} select

[jira] [Commented] (CALCITE-1624) Inefficient plan for NOT IN correlated subqueries

2019-04-18 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16821194#comment-16821194 ] Vineet Garg commented on CALCITE-1624: -- [~danny0405] Sure go ahead. You might want to confirm if

[jira] [Assigned] (CALCITE-3007) Type mismatch for ANY subquery in project

2019-04-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg reassigned CALCITE-3007: Assignee: Vineet Garg > Type mismatch for ANY subquery in project >

[jira] [Updated] (CALCITE-3011) Support outer joins with AggregateJoinTransposeRule

2019-04-17 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-3011: - Summary: Support outer joins with AggregateJoinTransposeRule (was: Support for outer joins

[jira] [Created] (CALCITE-3011) Support for outer joins with AggregateJoinTransposeRule

2019-04-17 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-3011: Summary: Support for outer joins with AggregateJoinTransposeRule Key: CALCITE-3011 URL: https://issues.apache.org/jira/browse/CALCITE-3011 Project: Calcite

[jira] [Commented] (CALCITE-3007) Type mismatch for ANY subquery in project

2019-04-16 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16819588#comment-16819588 ] Vineet Garg commented on CALCITE-3007: -- I can take a look if you aren't already looking at it

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-16 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16819265#comment-16819265 ] Vineet Garg commented on CALCITE-2986: -- [~hyuan] Right I was talking about <>ANY in general case. 

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-15 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16818502#comment-16818502 ] Vineet Garg commented on CALCITE-2986: -- [~hyuan] Let's say you have {code:sql}select col1, col2 <>

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-15 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16818396#comment-16818396 ] Vineet Garg commented on CALCITE-2986: -- bq. I think the <> ANY must be taken into the join

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-13 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16817092#comment-16817092 ] Vineet Garg commented on CALCITE-2986: -- bq. It's not true that IN will be rewritten to LEFT join,

[jira] [Comment Edited] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-12 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16816716#comment-16816716 ] Vineet Garg edited comment on CALCITE-2986 at 4/12/19 10:38 PM: bq. 

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-12 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16816716#comment-16816716 ] Vineet Garg commented on CALCITE-2986: -- bq  <>ANY should probably be transformed in same way as IN

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-12 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16816715#comment-16816715 ] Vineet Garg commented on CALCITE-2986: -- I have opened a pull request for {{=ANY}} rewrite. I still

[jira] [Commented] (CALCITE-2991) getMaxRowCount should return rowcount 1 for an aggregate with constant keys

2019-04-11 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16815869#comment-16815869 ] Vineet Garg commented on CALCITE-2991: -- [~hyuan] I am not sure if I understand what you said.

[jira] [Created] (CALCITE-2991) getMaxRowCount should return rowcount 1 for an aggregate with constant keys

2019-04-11 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-2991: Summary: getMaxRowCount should return rowcount 1 for an aggregate with constant keys Key: CALCITE-2991 URL: https://issues.apache.org/jira/browse/CALCITE-2991

[jira] [Comment Edited] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16812867#comment-16812867 ] Vineet Garg edited comment on CALCITE-2986 at 4/8/19 11:23 PM: --- [~hyuan]

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16812867#comment-16812867 ] Vineet Garg commented on CALCITE-2986: -- [~hyuan] I have given it some thought and as you noticed

[jira] [Commented] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16812799#comment-16812799 ] Vineet Garg commented on CALCITE-2986: -- {{=ANY}} is equivalent to IN therefore such queries should

[jira] [Comment Edited] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16812799#comment-16812799 ] Vineet Garg edited comment on CALCITE-2986 at 4/8/19 9:22 PM: -- {{=ANY}} is

[jira] [Updated] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2986: - Labels: sub-query (was: ) > Wrong results with =ANY subquery >

[jira] [Updated] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2986: - Description: ANY/SOME subqueries are rewritten using MAX/MIN and cross-join. This is wrong

[jira] [Created] (CALCITE-2986) Wrong results with =ANY subquery

2019-04-08 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-2986: Summary: Wrong results with =ANY subquery Key: CALCITE-2986 URL: https://issues.apache.org/jira/browse/CALCITE-2986 Project: Calcite Issue Type: Bug

[jira] [Updated] (CALCITE-2971) Correlated sub-query in JOIN is failing

2019-04-01 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2971: - Summary: Correlated sub-query in JOIN is failing (was: Correlated subquery in JOIN is

[jira] [Created] (CALCITE-2971) Correlated subquery in JOIN is failing

2019-04-01 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-2971: Summary: Correlated subquery in JOIN is failing Key: CALCITE-2971 URL: https://issues.apache.org/jira/browse/CALCITE-2971 Project: Calcite Issue Type: Bug

[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-04-01 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16807047#comment-16807047 ] Vineet Garg commented on CALCITE-2954: -- Logged CALCITE-2971 to track the issue with correlated

[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-31 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806272#comment-16806272 ] Vineet Garg commented on CALCITE-2954: -- [~hyuan] This test case fails even with the patch. I'll

[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-29 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16805469#comment-16805469 ] Vineet Garg commented on CALCITE-2954: -- Thanks for providing the feedback [~hyuan]. I have updated

[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-27 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16803529#comment-16803529 ] Vineet Garg commented on CALCITE-2954: -- [~hyuan] Would you mind taking a look at the PR? >

[jira] [Updated] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2954: - Labels: sub-query (was: ) > SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on

[jira] [Created] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-25 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-2954: Summary: SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id Key: CALCITE-2954 URL:

[jira] [Commented] (CALCITE-2948) SqlToRelConverter generates complicated logical plan for subquery

2019-03-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16801292#comment-16801292 ] Vineet Garg commented on CALCITE-2948: -- Although this and  CALCITE-1624 are different problems but

[jira] [Updated] (CALCITE-2948) SqlToRelConverter generates complicated logical plan for subquery

2019-03-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2948: - Labels: sub-query (was: ) > SqlToRelConverter generates complicated logical plan for subquery

[jira] [Commented] (CALCITE-2857) SemiJoin extends Join directly instead of EquiJoin to support non-equi condition

2019-03-11 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16790255#comment-16790255 ] Vineet Garg commented on CALCITE-2857: -- {quote}You're probably right. So, would we split into

[jira] [Commented] (CALCITE-2857) SemiJoin extends Join directly instead of EquiJoin to support non-equi condition

2019-03-07 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16787523#comment-16787523 ] Vineet Garg commented on CALCITE-2857: -- bq. Agree, either IN or NOT IN, a.k.a semi-join and

[jira] [Commented] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16777572#comment-16777572 ] Vineet Garg commented on CALCITE-1513: -- [~julianhyde] Can you please merge the PR? Opened

[jira] [Updated] (CALCITE-2874) NOT IN correlated subquery has un-necessary join

2019-02-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated CALCITE-2874: - Labels: sub-query (was: ) > NOT IN correlated subquery has un-necessary join >

[jira] [Created] (CALCITE-2874) NOT IN correlated subquery has un-necessary join

2019-02-25 Thread Vineet Garg (JIRA)
Vineet Garg created CALCITE-2874: Summary: NOT IN correlated subquery has un-necessary join Key: CALCITE-2874 URL: https://issues.apache.org/jira/browse/CALCITE-2874 Project: Calcite Issue

[jira] [Assigned] (CALCITE-2874) NOT IN correlated subquery has un-necessary join

2019-02-25 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg reassigned CALCITE-2874: Assignee: Vineet Garg > NOT IN correlated subquery has un-necessary join >

[jira] [Commented] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-22 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16775551#comment-16775551 ] Vineet Garg commented on CALCITE-1513: -- [~julianhyde] I have created a PR to add the test at

[jira] [Assigned] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-22 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg reassigned CALCITE-1513: Assignee: Vineet Garg > Correlated NOT IN query throws AssertionError >

[jira] [Commented] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-21 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16774829#comment-16774829 ] Vineet Garg commented on CALCITE-1513: -- Although correct the above plan is slightly inefficient.

[jira] [Comment Edited] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-21 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16774826#comment-16774826 ] Vineet Garg edited comment on CALCITE-1513 at 2/22/19 6:21 AM: --- The query

[jira] [Comment Edited] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-21 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16774826#comment-16774826 ] Vineet Garg edited comment on CALCITE-1513 at 2/22/19 6:18 AM: --- The query

[jira] [Commented] (CALCITE-1513) Correlated NOT IN query throws AssertionError

2019-02-21 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16774826#comment-16774826 ] Vineet Garg commented on CALCITE-1513: -- The query doesn't throw assertion anymore. Following is

[jira] [Commented] (CALCITE-1726) Subquery in FILTER is left untransformed

2019-02-07 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16763306#comment-16763306 ] Vineet Garg commented on CALCITE-1726: -- Created a pull request to fix this at

[jira] [Commented] (CALCITE-1726) Subquery in FILTER is left untransformed

2019-02-07 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16763303#comment-16763303 ] Vineet Garg commented on CALCITE-1726: -- I took a look into this. Issue is that planner

[jira] [Commented] (CALCITE-2329) Enhance SubQueryRemoveRule to rewrite IN operator with the constant from the left side more optimally

2019-01-31 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16757643#comment-16757643 ] Vineet Garg commented on CALCITE-2329: -- bq. The "more optimal plan" pushes the "deptno=2" filter

[jira] [Commented] (CALCITE-2329) Enhance SubQueryRemoveRule to rewrite IN operator with the constant from the left side more optimally

2019-01-30 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16756776#comment-16756776 ] Vineet Garg commented on CALCITE-2329: -- [~vvysotskyi] Thanks, I guess it is correct now because of

[jira] [Commented] (CALCITE-2329) Enhance SubQueryRemoveRule to rewrite IN operator with the constant from the left side more optimally

2019-01-30 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16756630#comment-16756630 ] Vineet Garg commented on CALCITE-2329: -- Sorry to bring up the old issues but I just noticed it.

[jira] [Commented] (CALCITE-2295) Correlated SubQuery with Project will generate error plan

2018-05-09 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16469749#comment-16469749 ] Vineet Garg commented on CALCITE-2295: -- [~julianhyde] Does *SqlToRelConverter* not support

[jira] [Commented] (CALCITE-2071) Query with IN and OR in WHERE clause returns wrong result

2017-12-14 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16291572#comment-16291572 ] Vineet Garg commented on CALCITE-2071: -- Thanks [~julianhyde]. That makes sense to me. > Query with

[jira] [Commented] (CALCITE-2071) Query with IN and OR in WHERE clause returns wrong result

2017-12-13 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290056#comment-16290056 ] Vineet Garg commented on CALCITE-2071: -- I wonder why changing the tests to quidem lead to this

[jira] [Commented] (CALCITE-2071) Query with IN and OR in WHERE clause returns wrong result

2017-12-12 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16288206#comment-16288206 ] Vineet Garg commented on CALCITE-2071: -- [~julianhyde] [~vvysotskyi] I have updated the patch to

[jira] [Commented] (CALCITE-2071) Query with IN and OR in WHERE clause returns wrong result

2017-12-12 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16288103#comment-16288103 ] Vineet Garg commented on CALCITE-2071: -- [~julianhyde] Thanks for looking at it. This change

[jira] [Commented] (CALCITE-2071) Query with IN operators in WHERE clause returns wrong result

2017-12-11 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16286874#comment-16286874 ] Vineet Garg commented on CALCITE-2071: -- I took a look at it. I believe the issue is in

[jira] [Commented] (CALCITE-2071) Query with IN operators in WHERE clause returns wrong result

2017-12-07 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16283098#comment-16283098 ] Vineet Garg commented on CALCITE-2071: -- Sorry I haven't gotten time to look at it yet. I'll look at

[jira] [Commented] (CALCITE-1851) Decorrelation should get rid of correlated predicates while decorrelation filter condition

2017-06-19 Thread Vineet Garg (JIRA)
[ https://issues.apache.org/jira/browse/CALCITE-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16055014#comment-16055014 ] Vineet Garg commented on CALCITE-1851: -- I am trying to write a test case. I'll attach it once I

  1   2   >