[jira] [Commented] (CALCITE-6185) Support more date format

2024-01-07 Thread Caican Cai (Jira)


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

Caican Cai commented on CALCITE-6185:
-

Sorry, I changed the wrong jira title. I'm sorry for the trouble. I only 
implemented more date format for this jira.

> Support more date format
> 
>
> Key: CALCITE-6185
> URL: https://issues.apache.org/jira/browse/CALCITE-6185
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Caican Cai
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.37.0
>
>
> There are currently some date formats that are not supported. More postgres 
> and bigquery date formats are supported.
>  # Support CC format format and add tests (pg)
>  # Consider supporting timezone,
>  # full lower case day name(day) pg
>  # lower case day name(dy) pg
> [https://cloud.google.com/bigquery/docs/reference/standard-sql/format-elements]
> [https://www.postgresql.org/docs/current/functions-formatting.html]



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


[jira] [Updated] (CALCITE-6185) Support more date format

2024-01-07 Thread Caican Cai (Jira)


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

Caican Cai updated CALCITE-6185:

Summary: Support more date format  (was: Support century  function format)

> Support more date format
> 
>
> Key: CALCITE-6185
> URL: https://issues.apache.org/jira/browse/CALCITE-6185
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Caican Cai
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.37.0
>
>
> There are currently some date formats that are not supported. More postgres 
> and bigquery date formats are supported.
>  # Support CC format format and add tests (pg)
>  # Consider supporting timezone,
>  # full lower case day name(day) pg
>  # lower case day name(dy) pg
> [https://cloud.google.com/bigquery/docs/reference/standard-sql/format-elements]
> [https://www.postgresql.org/docs/current/functions-formatting.html]



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


[jira] [Commented] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao commented on CALCITE-6119:
--

Fixed via 
https://github.com/apache/calcite/pull/3525/commits/75db9c5e82dab0ef0978415a337fc696182a1916

> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
>
> One of the main features is a fixing for SELinux users (1.19.1).
> testcontainers/testcontainers-java#6294
> bugfixes(1.19.3)
> Register default network alias using ContainerDef
> Fix regression using GenericContainer#setImage
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3



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


[jira] [Resolved] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao resolved CALCITE-6119.
--
Fix Version/s: 1.37.0
   Resolution: Fixed

> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.37.0
>
>
> One of the main features is a fixing for SELinux users (1.19.1).
> testcontainers/testcontainers-java#6294
> bugfixes(1.19.3)
> Register default network alias using ContainerDef
> Fix regression using GenericContainer#setImage
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3



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


[jira] [Resolved] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Benchao Li (Jira)


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

Benchao Li resolved CALCITE-6191.
-
Resolution: Duplicate

> Remove join if input is one row literal
> ---
>
> Key: CALCITE-6191
> URL: https://issues.apache.org/jira/browse/CALCITE-6191
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Jiajun Xie
>Assignee: Jiajun Xie
>Priority: Minor
>
> Here are some Join Rules
> {noformat}
> at CoreRules.java | grep ' #JOIN_'
>    * @see #JOIN_REDUCE_EXPRESSIONS
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_TO_SEMI_JOIN */
>   /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. 
> */
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
>    * @see #JOIN_TO_MULTI_JOIN
> {noformat}
> I cannot optimize the SQL by using them.
> {noformat}
> SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
> Here is optimized RelNode that I want get.
> {code:java}
> LogicalProject(EMPNO=[$0])   
>   LogicalFilter(condition=[=($0, 1)])     
>      LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
> But now it is
> {noformat}
> LogicalProject(EMPNO=[$0])
>   LogicalFilter(condition=[=($0, $9)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
>       LogicalValues(tuples=[[{ 1 }]]){noformat}



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


[jira] [Reopened] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Benchao Li (Jira)


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

Benchao Li reopened CALCITE-6191:
-

I'm reopening this to change the resolution to "duplicated"

> Remove join if input is one row literal
> ---
>
> Key: CALCITE-6191
> URL: https://issues.apache.org/jira/browse/CALCITE-6191
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Jiajun Xie
>Assignee: Jiajun Xie
>Priority: Minor
>
> Here are some Join Rules
> {noformat}
> at CoreRules.java | grep ' #JOIN_'
>    * @see #JOIN_REDUCE_EXPRESSIONS
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_TO_SEMI_JOIN */
>   /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. 
> */
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
>    * @see #JOIN_TO_MULTI_JOIN
> {noformat}
> I cannot optimize the SQL by using them.
> {noformat}
> SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
> Here is optimized RelNode that I want get.
> {code:java}
> LogicalProject(EMPNO=[$0])   
>   LogicalFilter(condition=[=($0, 1)])     
>      LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
> But now it is
> {noformat}
> LogicalProject(EMPNO=[$0])
>   LogicalFilter(condition=[=($0, $9)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
>       LogicalValues(tuples=[[{ 1 }]]){noformat}



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


[jira] [Resolved] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Jiajun Xie (Jira)


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

Jiajun Xie resolved CALCITE-6191.
-
Resolution: Fixed

> Remove join if input is one row literal
> ---
>
> Key: CALCITE-6191
> URL: https://issues.apache.org/jira/browse/CALCITE-6191
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Jiajun Xie
>Assignee: Jiajun Xie
>Priority: Minor
>
> Here are some Join Rules
> {noformat}
> at CoreRules.java | grep ' #JOIN_'
>    * @see #JOIN_REDUCE_EXPRESSIONS
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_TO_SEMI_JOIN */
>   /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. 
> */
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
>    * @see #JOIN_TO_MULTI_JOIN
> {noformat}
> I cannot optimize the SQL by using them.
> {noformat}
> SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
> Here is optimized RelNode that I want get.
> {code:java}
> LogicalProject(EMPNO=[$0])   
>   LogicalFilter(condition=[=($0, 1)])     
>      LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
> But now it is
> {noformat}
> LogicalProject(EMPNO=[$0])
>   LogicalFilter(condition=[=($0, $9)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
>       LogicalValues(tuples=[[{ 1 }]]){noformat}



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


[jira] [Commented] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Benchao Li (Jira)


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

Benchao Li commented on CALCITE-6191:
-

Isn't this duplicated with CALCITE-6162?

> Remove join if input is one row literal
> ---
>
> Key: CALCITE-6191
> URL: https://issues.apache.org/jira/browse/CALCITE-6191
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Jiajun Xie
>Assignee: Jiajun Xie
>Priority: Minor
>
> Here are some Join Rules
> {noformat}
> at CoreRules.java | grep ' #JOIN_'
>    * @see #JOIN_REDUCE_EXPRESSIONS
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_TO_SEMI_JOIN */
>   /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. 
> */
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
>    * @see #JOIN_TO_MULTI_JOIN
> {noformat}
> I cannot optimize the SQL by using them.
> {noformat}
> SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
> Here is optimized RelNode that I want get.
> {code:java}
> LogicalProject(EMPNO=[$0])   
>   LogicalFilter(condition=[=($0, 1)])     
>      LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
> But now it is
> {noformat}
> LogicalProject(EMPNO=[$0])
>   LogicalFilter(condition=[=($0, $9)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
>       LogicalValues(tuples=[[{ 1 }]]){noformat}



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


[jira] [Commented] (CALCITE-6188) Multi-query optimization

2024-01-07 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-6188:
--

The DML options are probably syntactic sugar. Note that
{code:java}
oddEmp = (
  DELETE emp
  WHERE empno % 2 = 0),
newDept = (
  UPDATE dept
  SET location = to_lower(location)
  WHERE deptno < 20),
newLocation = (
  INSERT INTO location
  VALUES ('Austin', 'TX', 'HQ')){code}
are equivalent to
{code:java}
oddEmp = (
  SELECT *
  FROM emp
  EXCEPT
  SELECT *
  FROM emp
  WHERE empno % 2 = 0),
newDept = (
  SELECT deptno, dname,
  CASE
  WHEN deptno < 20 THEN to_lower(location)
  ELSE location
  END AS location
  FROM dept),
newLocation = (
  SELECT *
  FROM location
  UNION ALL
  VALUES ('Austin', 'TX', 'HQ')){code}
Except that the cost model is different (writing 999 rows may be more expensive 
than deleting 1 row from a 1,000 row table), and that  we will still need to do 
the 'real' DML at the end if the tables are global, not temporary, tables.

Converting the DML operations into relational operators gives the optimizer 
more opportunities.

> Multi-query optimization
> 
>
> Key: CALCITE-6188
> URL: https://issues.apache.org/jira/browse/CALCITE-6188
> Project: Calcite
>  Issue Type: Improvement
>Reporter: Julian Hyde
>Priority: Major
>
> Devise extensions to SQL so that queries with multiple input tables, multiple 
> intermediate tables, and multiple output data sets (result sets and DML 
> operations) can be defined in one SQL statement, optimized, and executed 
> atomically.
> There are many flavors of multi-query optimization, depending on whether each 
> occurrence of "multiple" in the previous paragraph is replaced with 0, 1 or 
> "several". Our goal, here, is to allow them all to be expressed. We can then 
> devise planning strategies that work for particular flavors.
> Examples of multi-queries:
>  * {*}Multiple DML outputs{*}. An INSERT statement that writes into a table 
> but also updates an index,
>  * {*}Multiple DML outputs, complex intermediate tables{*}. A DAG that 
> represents an ETL/ELT job;
>  * {*}Multiple query outputs{*}. A query that produces several data sets (say 
> a list of invoices for
> orders and a list of products that need to be restocked);
>  * {*}DAG query{*}. A query that uses intermediate results more than once.
> See discussion in the [Multi-query optimization email 
> thread|https://lists.apache.org/thread/mcdqwrtpx0os54t2nn9vtk17spkp5o5k].
> Here are some SQL examples.
> We add a new keyword {{MULTI}} that represents a statement whose output 
> contains multiple data sets and DML operations, each with a unique name. For 
> intermediate results, we use the existing {{WITH}} clause.
> h3. 1. Multi DML
> Read from one or more tables, write to one or more tables.
> An example is inserting into a table and also an index on that table 
> (represented as a sorted table).
> {code:sql}
> WITH
>   empDelta AS (
>   SELECT * FROM emp2
>   EXCEPT
>   SELECT * FROM emp)
> MULTI
>   insertEmp AS (
> INSERT INTO emp
> TABLE empDelta),
>   insertEmpDeptno AS (
> MERGE empDeptno AS e
> USING TABLE empDelta AS d
> ON e.deptno = d.deptno
> WHEN NOT MATCHED THEN INSERT VALUES (deptno));
> {code}
> h3. 2. Query that creates temporary table and uses it more than once
> {code:sql}
> WITH
>   temp AS (
> SELECT *
> FROM emp AS e
> JOIN dept USING (deptno)
> WHERE e.job = 'MANAGER'
> OR d.location = 'CHICAGO')
> SELECT deptno,
>   (SELECT AVG(sal)
> FROM temp AS t
> WHERE t.deptno = e.deptno) AS deptAvgSal,
>   (SELECT AVG(sal)
> FROM temp AS t
> WHERE t.job = e.job) AS jobAvgSal
> FROM e
> WHERE e.deptno IN (10, 20);
> {code}
> h3. 3. Query whose optimal plan might use a temporary table
> This query produces the same result as the previous query. There is a common 
> relational expression, so the optimizer should consider a DAG plan with a 
> reified intermediate result.
> {code:sql}
> SELECT deptno,
>   (SELECT AVG(e2.sal)
> FROM emp AS e2
> JOIN dept AS d USING (deptno)
> WHERE (e2.job = 'MANAGER'
>   OR d.location = 'CHICAGO')
> AND e2.deptno = e.deptno) AS deptAvgSal,
>   (SELECT AVG(e3.sal)
> FROM emp AS e3
> JOIN dept AS d USING (deptno)
> WHERE (e3.job = 'MANAGER'
>   OR d.location = 'CHICAGO')
> AND e3.job = e.job) AS jobAvgSal
> FROM e
> WHERE e.deptno IN (10, 20);
> {code}
> h3. 4. Query that produces several data sets
> {code:sql}
> WITH
>   newOrders AS (
> SELECT *
> FROM orders
> WHERE orderDate > DATE '2023-01-25')
> MULTI
>   invoices AS (
> SELECT customerName, SUM(amount)
> FROM newOrders
> GROUP BY customerName),
>   restock AS (
> SELECT productId
> FROM invent

[jira] [Commented] (CALCITE-6185) Support century function format

2024-01-07 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-6185:
--

Which function or functions should support this format element?

> Support century  function format
> 
>
> Key: CALCITE-6185
> URL: https://issues.apache.org/jira/browse/CALCITE-6185
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Caican Cai
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.37.0
>
>
> There are currently some date formats that are not supported. More postgres 
> and bigquery date formats are supported.
>  # Support CC format format and add tests (pg)
>  # Consider supporting timezone,
>  # full lower case day name(day) pg
>  # lower case day name(dy) pg
> [https://cloud.google.com/bigquery/docs/reference/standard-sql/format-elements]
> [https://www.postgresql.org/docs/current/functions-formatting.html]



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


[jira] [Commented] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-6191:
--

I think you’re actually converting the Join into a Project. 



if there’s a Project after the Join the rule doesn’t need to worry about it - 
ProjectMergeRule will deal with it later. 

This pattern comes up in Morel. “from e in emp, one in[1], doubleSal in[e.sal * 
2]” is equivalent to “from e in emp yield \{e.empno, e.sal, one = 1, doubleSal 
= e.sal * 2}”. 

> Remove join if input is one row literal
> ---
>
> Key: CALCITE-6191
> URL: https://issues.apache.org/jira/browse/CALCITE-6191
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Jiajun Xie
>Assignee: Jiajun Xie
>Priority: Minor
>
> Here are some Join Rules
> {noformat}
> at CoreRules.java | grep ' #JOIN_'
>    * @see #JOIN_REDUCE_EXPRESSIONS
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_SUB_QUERY_TO_CORRELATE */
>    * @see #JOIN_TO_SEMI_JOIN */
>   /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. 
> */
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
>   /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
>   /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
>    * @see #JOIN_TO_MULTI_JOIN
> {noformat}
> I cannot optimize the SQL by using them.
> {noformat}
> SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
> Here is optimized RelNode that I want get.
> {code:java}
> LogicalProject(EMPNO=[$0])   
>   LogicalFilter(condition=[=($0, 1)])     
>      LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
> But now it is
> {noformat}
> LogicalProject(EMPNO=[$0])
>   LogicalFilter(condition=[=($0, $9)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
>       LogicalValues(tuples=[[{ 1 }]]){noformat}



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


[jira] [Updated] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao updated CALCITE-6119:
-
Description: 
One of the main features is a fixing for SELinux users (1.19.1).
testcontainers/testcontainers-java#6294

bugfixes(1.19.3)
Register default network alias using ContainerDef
Fix regression using GenericContainer#setImage

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3

  was:

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3


> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
>
> One of the main features is a fixing for SELinux users (1.19.1).
> testcontainers/testcontainers-java#6294
> bugfixes(1.19.3)
> Register default network alias using ContainerDef
> Fix regression using GenericContainer#setImage
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3



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


[jira] [Updated] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao updated CALCITE-6119:
-
Description: 

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3

  was:
One of the main features is a fixing for SELinux users.
https://github.com/testcontainers/testcontainers-java/pull/6294

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3


> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
>
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3



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


[jira] [Updated] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao updated CALCITE-6119:
-
Description: 
One of the main features is a fixing for SELinux users.
https://github.com/testcontainers/testcontainers-java/pull/6294

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3

  was:
One of the main features is a fixing for SELinux users.
https://github.com/testcontainers/testcontainers-java/pull/6294

release notes:
https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.1


> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
>
> One of the main features is a fixing for SELinux users.
> https://github.com/testcontainers/testcontainers-java/pull/6294
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.3



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


[jira] [Updated] (CALCITE-6119) Upgrade test-containers to 1.19.3

2024-01-07 Thread Ran Tao (Jira)


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

Ran Tao updated CALCITE-6119:
-
Summary: Upgrade test-containers to 1.19.3  (was: Upgrade test-containers 
to 1.19.1)

> Upgrade test-containers to 1.19.3
> -
>
> Key: CALCITE-6119
> URL: https://issues.apache.org/jira/browse/CALCITE-6119
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.36.0
>Reporter: Ran Tao
>Priority: Minor
>  Labels: pull-request-available
>
> One of the main features is a fixing for SELinux users.
> https://github.com/testcontainers/testcontainers-java/pull/6294
> release notes:
> https://github.com/testcontainers/testcontainers-java/releases/tag/1.19.1



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


[jira] [Created] (CALCITE-6191) Remove join if input is one row literal

2024-01-07 Thread Jiajun Xie (Jira)
Jiajun Xie created CALCITE-6191:
---

 Summary: Remove join if input is one row literal
 Key: CALCITE-6191
 URL: https://issues.apache.org/jira/browse/CALCITE-6191
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Jiajun Xie
Assignee: Jiajun Xie


Here are some Join Rules
{noformat}
at CoreRules.java | grep ' #JOIN_'
   * @see #JOIN_REDUCE_EXPRESSIONS
   * @see #JOIN_SUB_QUERY_TO_CORRELATE */
   * @see #JOIN_SUB_QUERY_TO_CORRELATE */
   * @see #JOIN_TO_SEMI_JOIN */
  /** As {@link #JOIN_COMMUTE} but swaps outer joins as well as inner joins. */
  /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the left input is
  /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but only the right input is
  /** As {@link #JOIN_PROJECT_BOTH_TRANSPOSE} but match outer as well as
  /** As {@link #JOIN_PROJECT_LEFT_TRANSPOSE} but match outer as well as
  /** As {@link #JOIN_PROJECT_RIGHT_TRANSPOSE} but match outer as well as
   * @see #JOIN_TO_MULTI_JOIN
{noformat}
I cannot optimize the SQL by using them.
{noformat}
SELECT EMPNO FROM emp, (SELECT 1 as c) temp WHERE EMPNO = temp.c{noformat}
Here is optimized RelNode that I want get.
{code:java}
LogicalProject(EMPNO=[$0])   
  LogicalFilter(condition=[=($0, 1)])     
     LogicalTableScan(table=[[CATALOG, SALES, EMP]]){code}
But now it is
{noformat}
LogicalProject(EMPNO=[$0])
  LogicalFilter(condition=[=($0, $9)])
    LogicalJoin(condition=[true], joinType=[inner])
      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
      LogicalValues(tuples=[[{ 1 }]]){noformat}



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