[jira] [Created] (CALCITE-3642) Update cassandra tests upgrade from junit4 to junit5

2019-12-27 Thread Forward Xu (Jira)
Forward Xu created CALCITE-3642:
---

 Summary: Update cassandra tests upgrade from junit4 to junit5
 Key: CALCITE-3642
 URL: https://issues.apache.org/jira/browse/CALCITE-3642
 Project: Calcite
  Issue Type: Improvement
Reporter: Forward Xu


Update `Cassandra` tests upgrade from junit4 to junit5



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3641) Oracle XMLCOMMENT Function Support

2019-12-27 Thread Ritesh (Jira)
Ritesh created CALCITE-3641:
---

 Summary: Oracle XMLCOMMENT Function Support
 Key: CALCITE-3641
 URL: https://issues.apache.org/jira/browse/CALCITE-3641
 Project: Calcite
  Issue Type: Sub-task
Reporter: Ritesh
Assignee: Ritesh


[https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions218.htm]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3640) Oracle EXISTSNODE Function Support

2019-12-27 Thread Ritesh (Jira)
Ritesh created CALCITE-3640:
---

 Summary: Oracle EXISTSNODE Function Support
 Key: CALCITE-3640
 URL: https://issues.apache.org/jira/browse/CALCITE-3640
 Project: Calcite
  Issue Type: Sub-task
Reporter: Ritesh


[https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions048.htm]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: License header vs package-info.java vs whitespace

2019-12-27 Thread Rui Wang
Thanks for updating! It is useful to know that the empty line has a usage.



-Rui

On Fri, Dec 27, 2019 at 12:30 PM Vladimir Sitnikov <
sitnikov.vladi...@gmail.com> wrote:

> Ok, it looks like I found yet another reasoning for having a blank line
> between consequent comments.
> It simplifies shell-like comment processing.
>
> For instance, the following is non-trivial for an automatic header update
> (it is not clear where copyright ends and the next comment starts):
>
> #
> # Licensed under Apache 2.0
> #
> # Root logger is configured at INFO and is sent to A1
> log4j.rootLogger=INFO, A1
>
> However, if we add a blank line in-between the two comments, then it
> becomes much easier for machine processing:
>
> #
> # Licensed under Apache 2.0
> #
>
> # Root logger is configured at INFO and is sent to A1
> log4j.rootLogger=INFO, A1
>
> Vladimir
>


Re: License header vs package-info.java vs whitespace

2019-12-27 Thread Vladimir Sitnikov
Ok, it looks like I found yet another reasoning for having a blank line
between consequent comments.
It simplifies shell-like comment processing.

For instance, the following is non-trivial for an automatic header update
(it is not clear where copyright ends and the next comment starts):

#
# Licensed under Apache 2.0
#
# Root logger is configured at INFO and is sent to A1
log4j.rootLogger=INFO, A1

However, if we add a blank line in-between the two comments, then it
becomes much easier for machine processing:

#
# Licensed under Apache 2.0
#

# Root logger is configured at INFO and is sent to A1
log4j.rootLogger=INFO, A1

Vladimir


[jira] [Created] (CALCITE-3639) JoinConditionPushRule fail to push filter to inputs

2019-12-27 Thread Wang Yanlin (Jira)
Wang Yanlin created CALCITE-3639:


 Summary: JoinConditionPushRule fail to push filter to inputs
 Key: CALCITE-3639
 URL: https://issues.apache.org/jira/browse/CALCITE-3639
 Project: Calcite
  Issue Type: Bug
Reporter: Wang Yanlin


The relnode(without applying optimize rules) for the sql
{code:java}
String sql = "select empno, emp.deptno from emp left join dept\n"
+ " on emp.deptno = dept.deptno and  empno = 10 and dept.deptno = 20";
{code}
is 
{code:java}
LogicalProject(EMPNO=[$0], DEPTNO=[$7])
  LogicalJoin(condition=[AND(=($7, $9), =($0, 10), =($9, 20))], joinType=[left])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
{code}
 

After optimized with *JoinConditionPushRule*, the relnode becomes
{code:java}
LogicalProject(EMPNO=[$0], DEPTNO=[$7])
  LogicalJoin(condition=[AND(=($7, $9), =($0, 10))], joinType=[left])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalFilter(condition=[=($0, 20)])
  LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
{code}
The optimize rule failed to push *empno = 10* to the left input, the better 
relnode should be
{code:java}
LogicalProject(EMPNO=[$0], DEPTNO=[$7])
  LogicalJoin(condition=[AND(=($7, $9))], joinType=[left])
LogicalFilter(condition=[=($0, 10)])
  LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalFilter(condition=[=($0, 20)])
  LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
{code}
 

Add this test case to reproduce
{code:java}
// RelOptRulesTest
@Test public void testFilterInLeftJoin() {
String sql = "select empno, emp.deptno from emp left join dept\n"
+ " on emp.deptno = dept.deptno and  empno = 10 and dept.deptno = 20";
sql(sql).withRule(FilterJoinRule.JOIN).check();
  }

// data for this case











{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)