[jira] [Updated] (CALCITE-5514) Add a public toRex() instance method for RelJson

2023-02-03 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-5514:

Labels: pull-request-available  (was: )

> Add a public toRex() instance method for RelJson
> 
>
> Key: CALCITE-5514
> URL: https://issues.apache.org/jira/browse/CALCITE-5514
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.32.0
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.33.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> CALCITE-5349 added several improvements for creating 
> {{org.apache.calcite.rel.externalize.RelJson}} such as the 
> {{withOperatorTable, withLibraryOperatorTable}} and, {{withJsonBuilder}} 
> methods. 
> However, the only method to deserialize JSON with the {{RelJson}} class is a 
> the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 
> It would be advantageous to have a {{RelJson}} instance method capable of 
> deserializing JSON into a {{RexNode}} after it has been customized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5514) Add a public toRex() instance method for RelJson

2023-02-03 Thread TJ Banghart (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TJ Banghart updated CALCITE-5514:
-
Description: 
CALCITE-5349 added several improvements for creating 
{{org.apache.calcite.rel.externalize.RelJson}} such as the {{withOperatorTable, 
withLibraryOperatorTable}} and, {{withJsonBuilder}} methods. 

However, the only method to deserialize JSON with the {{RelJson}} class is a 
the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 

It would be advantageous to have a {{RelJson}} instance method capable of 
deserializing JSON into a {{RexNode}} after it has been customized.

  was:
CALCITE-5349 added several improvements for creating 
{{org.apache.calcite.rel.externalize.RelJson}} such as {{withOperatorTable, 
withLibraryOperatorTable}} and, {{withJsonBuilder}}. 

However, the only method to deserialize JSON with the {{RelJson}} class is a 
the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 


> Add a public toRex() instance method for RelJson
> 
>
> Key: CALCITE-5514
> URL: https://issues.apache.org/jira/browse/CALCITE-5514
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.32.0
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Minor
> Fix For: 1.33.0
>
>
> CALCITE-5349 added several improvements for creating 
> {{org.apache.calcite.rel.externalize.RelJson}} such as the 
> {{withOperatorTable, withLibraryOperatorTable}} and, {{withJsonBuilder}} 
> methods. 
> However, the only method to deserialize JSON with the {{RelJson}} class is a 
> the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 
> It would be advantageous to have a {{RelJson}} instance method capable of 
> deserializing JSON into a {{RexNode}} after it has been customized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5514) Add a public toRex() instance method for RelJson

2023-02-03 Thread TJ Banghart (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TJ Banghart updated CALCITE-5514:
-
Description: 
CALCITE-5349 added several improvements for creating 
{{org.apache.calcite.rel.externalize.RelJson}} such as {{withOperatorTable, 
withLibraryOperatorTable}} and, {{withJsonBuilder}}. 

However, the only method to deserialize JSON with the {{RelJson}} class is a 
the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 

> Add a public toRex() instance method for RelJson
> 
>
> Key: CALCITE-5514
> URL: https://issues.apache.org/jira/browse/CALCITE-5514
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.32.0
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Minor
> Fix For: 1.33.0
>
>
> CALCITE-5349 added several improvements for creating 
> {{org.apache.calcite.rel.externalize.RelJson}} such as {{withOperatorTable, 
> withLibraryOperatorTable}} and, {{withJsonBuilder}}. 
> However, the only method to deserialize JSON with the {{RelJson}} class is a 
> the {{static}} {{readExpression()}} which creates a generic {{RelJson}}. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5514) Add a public toRex() instance method for RelJson

2023-02-03 Thread TJ Banghart (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TJ Banghart updated CALCITE-5514:
-
Summary: Add a public toRex() instance method for RelJson  (was: Add a 
public toRex() instance method for RelJson.)

> Add a public toRex() instance method for RelJson
> 
>
> Key: CALCITE-5514
> URL: https://issues.apache.org/jira/browse/CALCITE-5514
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.32.0
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Minor
> Fix For: 1.33.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-5514) Add a public toRex() instance method for RelJson.

2023-02-03 Thread TJ Banghart (Jira)
TJ Banghart created CALCITE-5514:


 Summary: Add a public toRex() instance method for RelJson.
 Key: CALCITE-5514
 URL: https://issues.apache.org/jira/browse/CALCITE-5514
 Project: Calcite
  Issue Type: Improvement
  Components: core
Affects Versions: 1.32.0
Reporter: TJ Banghart
Assignee: TJ Banghart
 Fix For: 1.33.0






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (CALCITE-5512) why not support FOR SYSTEM_VERSION AS OF

2023-02-03 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684007#comment-17684007
 ] 

Julian Hyde edited comment on CALCITE-5512 at 2/3/23 7:46 PM:
--

{quote}
why not support FOR SYSTEM_VERSION AS OF
{quote}

Because no one has contributed it.

{{FOR SYSTEM_VERSION AS OF}} is in the SQL standard. Reading the standard, 
proposing a feature, implementing it and testing it is a lot work.

I don't think you intended it this way, but your phrasing "why not support FOR 
SYSTEM_VERSION AS OF" comes over as a complaint, and that is insulting to the 
many people who maintain Calcite as volunteers. If you have a question, ask it 
on the dev list. If there is a missing feature, propose it as Jira feature 
request, but be prepared to do the work to write at least a good specification.


was (Author: julianhyde):
Because no one has contributed it.

> why not support FOR SYSTEM_VERSION AS OF 
> -
>
> Key: CALCITE-5512
> URL: https://issues.apache.org/jira/browse/CALCITE-5512
> Project: Calcite
>  Issue Type: Wish
>  Components: core
>Reporter: YangFei
>Priority: Major
>
> hive support FOR SYSTEM_VERSION AS OF/FOR SYSTEM_TIME AS OF, why calcite 
> Parser.jj not support FOR SYSTEM_VERSION AS OF



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5512) why not support FOR SYSTEM_VERSION AS OF

2023-02-03 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684007#comment-17684007
 ] 

Julian Hyde commented on CALCITE-5512:
--

Because no one has contributed it.

> why not support FOR SYSTEM_VERSION AS OF 
> -
>
> Key: CALCITE-5512
> URL: https://issues.apache.org/jira/browse/CALCITE-5512
> Project: Calcite
>  Issue Type: Wish
>  Components: core
>Reporter: YangFei
>Priority: Major
>
> hive support FOR SYSTEM_VERSION AS OF/FOR SYSTEM_TIME AS OF, why calcite 
> Parser.jj not support FOR SYSTEM_VERSION AS OF



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread Julian Hyde (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde updated CALCITE-5513:
-
Language:   (was: JAVA)

> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5248) Support Extended Column Aliasing

2023-02-03 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684006#comment-17684006
 ] 

Julian Hyde commented on CALCITE-5248:
--

Yes, perfect.  A back-link appears on SPARK-32726, so they will know about us. 
Thanks.

> Support Extended Column Aliasing
> 
>
> Key: CALCITE-5248
> URL: https://issues.apache.org/jira/browse/CALCITE-5248
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Jay Narale
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Based on the discussion here [1].
> The goal is to support exteneded column aliasing in where , on clause and 
> select List. An example is Teradata [2]
> A few edge cases to be considered for proper semantics
> 1. When SubQuery( maybe table) in from and Alias have the same name eg 
> {code:java}
>  SELECT  c_customerId as c FROM ( SELECT c FROM table) WHERE c = 'test' {code}
> {code:java}
>  SELECT  trim(c_customer_name) as c FROM ( SELECT c FROM table) WHERE c = 
> 'test' {code}
> Comments 
> In a database, the execution order is *FROM > WHERE > SELECT* so the 
> semantics should be that column in the subquery is given priority and a 
> filter is  applied to that column
>  
> Some edge cases that need consideration 
> [doc|https://docs.google.com/document/d/1bt_5CmRg97gh_j_lsVrnoEDn5N3TRNGeYcyX4uGD_0g/edit]
>  
>  [1] -  [https://lists.apache.org/thread/7zk5wqgsk64903w5mbt72pwjmsftx0kz]
>  [2] - 
> [https://docs.teradata.com/r/Teradata-Database-SQL-Fundamentals/June-2017/Basic-SQL-Syntax/Referencing-Object-Names-in-a-Request/Using-a-Column-Alias]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5248) Support Extended Column Aliasing

2023-02-03 Thread Jiajun Xie (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17683840#comment-17683840
 ] 

Jiajun Xie commented on CALCITE-5248:
-

[~jhyde] , Is the Jira link right?

> Support Extended Column Aliasing
> 
>
> Key: CALCITE-5248
> URL: https://issues.apache.org/jira/browse/CALCITE-5248
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Jay Narale
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Based on the discussion here [1].
> The goal is to support exteneded column aliasing in where , on clause and 
> select List. An example is Teradata [2]
> A few edge cases to be considered for proper semantics
> 1. When SubQuery( maybe table) in from and Alias have the same name eg 
> {code:java}
>  SELECT  c_customerId as c FROM ( SELECT c FROM table) WHERE c = 'test' {code}
> {code:java}
>  SELECT  trim(c_customer_name) as c FROM ( SELECT c FROM table) WHERE c = 
> 'test' {code}
> Comments 
> In a database, the execution order is *FROM > WHERE > SELECT* so the 
> semantics should be that column in the subquery is given priority and a 
> filter is  applied to that column
>  
> Some edge cases that need consideration 
> [doc|https://docs.google.com/document/d/1bt_5CmRg97gh_j_lsVrnoEDn5N3TRNGeYcyX4uGD_0g/edit]
>  
>  [1] -  [https://lists.apache.org/thread/7zk5wqgsk64903w5mbt72pwjmsftx0kz]
>  [2] - 
> [https://docs.teradata.com/r/Teradata-Database-SQL-Fundamentals/June-2017/Basic-SQL-Syntax/Referencing-Object-Names-in-a-Request/Using-a-Column-Alias]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Reopened] (CALCITE-5253) NATURAL join and USING should fail if join columns are not unique - expression validation partially broken

2023-02-03 Thread Alessandro Solimando (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alessandro Solimando reopened CALCITE-5253:
---

> NATURAL join and USING should fail if join columns are not unique - 
> expression validation partially broken
> --
>
> Key: CALCITE-5253
> URL: https://issues.apache.org/jira/browse/CALCITE-5253
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.31.0
>Reporter: Evgeny Stanilovsky
>Assignee: Evgeny Stanilovsky
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Such issue is not possible for now: 
> {code:java}
> CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER);
> CREATE TABLE t2(b INTEGER, c INTEGER, d INTEGER);
> CREATE TABLE t3(c INTEGER, d INTEGER, e INTEGER);
> SELECT t1.c, t2.d, t1.b, t1.a, t3.e FROM t1 natural join t2 natural join t3;
> {code}
> cause:
> {noformat}
> SqlValidatorException: Column name 'C' in NATURAL join or USING clause is not 
> unique on one side of join
> {noformat}
> This validation is correct for example for case :
>  
> {noformat}
> select e.ename, d.name from dept as d natural join (select ename, sal as 
> deptno, deptno from emp) as e
> {noformat}
> but fails as described above.
> Was broken by:
> [1] https://issues.apache.org/jira/browse/CALCITE-5171



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (CALCITE-5253) NATURAL join and USING should fail if join columns are not unique - expression validation partially broken

2023-02-03 Thread Alessandro Solimando (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alessandro Solimando resolved CALCITE-5253.
---
Resolution: Fixed

> NATURAL join and USING should fail if join columns are not unique - 
> expression validation partially broken
> --
>
> Key: CALCITE-5253
> URL: https://issues.apache.org/jira/browse/CALCITE-5253
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.31.0
>Reporter: Evgeny Stanilovsky
>Assignee: Evgeny Stanilovsky
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Such issue is not possible for now: 
> {code:java}
> CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER);
> CREATE TABLE t2(b INTEGER, c INTEGER, d INTEGER);
> CREATE TABLE t3(c INTEGER, d INTEGER, e INTEGER);
> SELECT t1.c, t2.d, t1.b, t1.a, t3.e FROM t1 natural join t2 natural join t3;
> {code}
> cause:
> {noformat}
> SqlValidatorException: Column name 'C' in NATURAL join or USING clause is not 
> unique on one side of join
> {noformat}
> This validation is correct for example for case :
>  
> {noformat}
> select e.ename, d.name from dept as d natural join (select ename, sal as 
> deptno, deptno from emp) as e
> {noformat}
> but fails as described above.
> Was broken by:
> [1] https://issues.apache.org/jira/browse/CALCITE-5171



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread jhonye (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17683802#comment-17683802
 ] 

jhonye commented on CALCITE-5513:
-

Get it, Thanks, Stamatis 

I will write the design later. 

> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread jhonye (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jhonye updated CALCITE-5513:

Description: 
How to use:

Input: SQL

Output: SQL

 

Calcite Core:

1. In Volcano Plan and iterator to optimize the Logical Plan. 

2. A rule recognize the Logical Plan and recommend materialized view Logical 
Plan list which can rewrite the origin Logical Plan .

3. the recommend algorithm need to design. (already done.)

 

  was:
How to use:

Input: SQL

Output: SQL

 

Calcite Core:

1. In Volcano Plan and iterator to optimize the Logical Plan. 

2. A rule recognize the Logical Plan and recommend materialized view Logical 
Plan list which can rewrite the origin Logical Plan .

3. the recommend algorithm need to design. (already done, Please assign to 
@jhonye.)

 


> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread Stamatis Zampetakis (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17683797#comment-17683797
 ] 

Stamatis Zampetakis commented on CALCITE-5513:
--

[~jhonye] I added you as contributor and assigned the ticket to you. I am going 
to clear the Fix Version since 1.33.0 release is already in RC phase so this 
cannot go in. 

Other than that the description is pretty abstract so I don't understand what's 
proposal/goal here; please elaborate.

> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
> Fix For: 1.33.0
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done, Please assign to 
> @jhonye.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread Stamatis Zampetakis (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stamatis Zampetakis updated CALCITE-5513:
-
Fix Version/s: (was: 1.33.0)

> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done, Please assign to 
> @jhonye.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (CALCITE-5513) Add Support Use Sql to recommend Materialized View

2023-02-03 Thread Stamatis Zampetakis (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stamatis Zampetakis reassigned CALCITE-5513:


Assignee: jhonye

> Add Support Use Sql to recommend Materialized View 
> ---
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.33.0
>Reporter: jhonye
>Assignee: jhonye
>Priority: Major
> Fix For: 1.33.0
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>  
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan. 
> 2. A rule recognize the Logical Plan and recommend materialized view Logical 
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done, Please assign to 
> @jhonye.)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-5253) NATURAL join and USING should fail if join columns are not unique - expression validation partially broken

2023-02-03 Thread Evgeny Stanilovsky (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17683785#comment-17683785
 ] 

Evgeny Stanilovsky commented on CALCITE-5253:
-

[~asolimando] seems issue with Status: closed (as this one) is not gathered by 
release notes filter [1] isn`t it ?

[1] 
https://github.com/apache/calcite/blob/calcite-1.33.0-rc0/site/_docs/history.md

> NATURAL join and USING should fail if join columns are not unique - 
> expression validation partially broken
> --
>
> Key: CALCITE-5253
> URL: https://issues.apache.org/jira/browse/CALCITE-5253
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.31.0
>Reporter: Evgeny Stanilovsky
>Assignee: Evgeny Stanilovsky
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Such issue is not possible for now: 
> {code:java}
> CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER);
> CREATE TABLE t2(b INTEGER, c INTEGER, d INTEGER);
> CREATE TABLE t3(c INTEGER, d INTEGER, e INTEGER);
> SELECT t1.c, t2.d, t1.b, t1.a, t3.e FROM t1 natural join t2 natural join t3;
> {code}
> cause:
> {noformat}
> SqlValidatorException: Column name 'C' in NATURAL join or USING clause is not 
> unique on one side of join
> {noformat}
> This validation is correct for example for case :
>  
> {noformat}
> select e.ename, d.name from dept as d natural join (select ename, sal as 
> deptno, deptno from emp) as e
> {noformat}
> but fails as described above.
> Was broken by:
> [1] https://issues.apache.org/jira/browse/CALCITE-5171



--
This message was sent by Atlassian Jira
(v8.20.10#820010)