[jira] [Commented] (CALCITE-2467) Upgrade owasp-dependency-check maven plugin to 3.3.1
[ https://issues.apache.org/jira/browse/CALCITE-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580668#comment-16580668 ] Julian Hyde commented on CALCITE-2467: -- I'm working on this (in both calcite and avatica). > Upgrade owasp-dependency-check maven plugin to 3.3.1 > > > Key: CALCITE-2467 > URL: https://issues.apache.org/jira/browse/CALCITE-2467 > Project: Calcite > Issue Type: New Feature > Components: build >Affects Versions: 1.17.0, avatica-1.12.0 >Reporter: Albert Baker >Assignee: Julian Hyde >Priority: Minor > > In pom.xml, upgrade maven plugin from 2.1.1 > to 3.3.1 (current version). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2467) Upgrade owasp-dependency-check maven plugin to 3.3.1
[ https://issues.apache.org/jira/browse/CALCITE-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-2467: - Issue Type: Improvement (was: New Feature) > Upgrade owasp-dependency-check maven plugin to 3.3.1 > > > Key: CALCITE-2467 > URL: https://issues.apache.org/jira/browse/CALCITE-2467 > Project: Calcite > Issue Type: Improvement > Components: build >Affects Versions: 1.17.0, avatica-1.12.0 >Reporter: Albert Baker >Assignee: Julian Hyde >Priority: Minor > > In pom.xml, upgrade maven plugin from 2.1.1 > to 3.3.1 (current version). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2467) Upgrade owasp-dependency-check maven plugin to 3.3.1
[ https://issues.apache.org/jira/browse/CALCITE-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-2467: - Affects Version/s: (was: 1.18.0) (was: avatica-go-3.1.0) (was: next) 1.17.0 avatica-1.12.0 > Upgrade owasp-dependency-check maven plugin to 3.3.1 > > > Key: CALCITE-2467 > URL: https://issues.apache.org/jira/browse/CALCITE-2467 > Project: Calcite > Issue Type: New Feature > Components: build >Affects Versions: 1.17.0, avatica-1.12.0 >Reporter: Albert Baker >Assignee: Julian Hyde >Priority: Minor > > In pom.xml, upgrade maven plugin from 2.1.1 > to 3.3.1 (current version). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2467) Upgrade owasp-dependency-check maven plugin to 3.3.1
[ https://issues.apache.org/jira/browse/CALCITE-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-2467: - Description: In pom.xml, upgrade maven plugin from 2.1.1 to 3.3.1 (current version). (was: Update the pom.xml from 2.1.1 to 3.3.1) > Upgrade owasp-dependency-check maven plugin to 3.3.1 > > > Key: CALCITE-2467 > URL: https://issues.apache.org/jira/browse/CALCITE-2467 > Project: Calcite > Issue Type: New Feature > Components: build >Affects Versions: 1.17.0, avatica-1.12.0 >Reporter: Albert Baker >Assignee: Julian Hyde >Priority: Minor > > In pom.xml, upgrade maven plugin from 2.1.1 > to 3.3.1 (current version). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2467) Upgrade owasp-dependency-check maven plugin to 3.3.1
[ https://issues.apache.org/jira/browse/CALCITE-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-2467: - Summary: Upgrade owasp-dependency-check maven plugin to 3.3.1 (was: Please update OWASP Dependency Check version to current 3.3.1) > Upgrade owasp-dependency-check maven plugin to 3.3.1 > > > Key: CALCITE-2467 > URL: https://issues.apache.org/jira/browse/CALCITE-2467 > Project: Calcite > Issue Type: New Feature > Components: build >Affects Versions: next, avatica-go-3.1.0, 1.18.0 >Reporter: Albert Baker >Assignee: Julian Hyde >Priority: Minor > > Update the pom.xml from 2.1.1 to 3.3.1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2467) Please update OWASP Dependency Check version to current 3.3.1
Albert Baker created CALCITE-2467: - Summary: Please update OWASP Dependency Check version to current 3.3.1 Key: CALCITE-2467 URL: https://issues.apache.org/jira/browse/CALCITE-2467 Project: Calcite Issue Type: New Feature Components: build Affects Versions: next, avatica-go-3.1.0, 1.18.0 Reporter: Albert Baker Assignee: Julian Hyde Update the pom.xml from 2.1.1 to 3.3.1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580461#comment-16580461 ] Julian Hyde edited comment on CALCITE-2466 at 8/14/18 9:42 PM: --- "NULL <> NULL" is valid SQL. It just returns UNKNOWN. I don't think you should change the validator to reject it. was (Author: julianhyde): "NULL <> NULL" is valid SQL. It just returns UNKNOWN. > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580461#comment-16580461 ] Julian Hyde commented on CALCITE-2466: -- "NULL <> NULL" is valid SQL. It just returns UNKNOWN. > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580456#comment-16580456 ] Shuyi Chen commented on CALCITE-2466: - i agree, I am thinking of adding or extending some logic in SqlBinaryOperator.validateCall() to reject <>, = and other range binary operators with null value. What do you think, [~julianhyde]? > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580261#comment-16580261 ] Julian Hyde commented on CALCITE-2466: -- I think supporting standard SQL semantics is much the best option. > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580246#comment-16580246 ] Shuyi Chen commented on CALCITE-2466: - so does it mean we only support is NULL or IS NOT NULL for null comparison? I thought *=* and *<>* has the same meaning of *IS NULL* or *IS NOT NULL*.I think we can either allow *=* and *<>* with null, or in validation phase, throw an exception for this kind of statement. What do you think, [~julianhyde]? > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-1026) Model in YAML format
[ https://issues.apache.org/jira/browse/CALCITE-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580240#comment-16580240 ] Julian Hyde commented on CALCITE-1026: -- Yes, the great thing about YAML is that it shares JSON's object model. (We would not be seriously considering it, otherwise.) Therefore some syntactic tests will suffice. > Model in YAML format > > > Key: CALCITE-1026 > URL: https://issues.apache.org/jira/browse/CALCITE-1026 > Project: Calcite > Issue Type: Bug >Reporter: Julian Hyde >Assignee: Julian Hyde >Priority: Major > > Models must currently be in JSON. YAML is more forgiving and flexible, so we > should support YAML as a format. > Jackson (versions 2.5 and above) can read YAML files and produce the same > output as the corresponding JSON. > As part of this change, we should add an example to > http://calcite.apache.org/docs/model.html. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580233#comment-16580233 ] Julian Hyde commented on CALCITE-2466: -- No. "x <> NULL" always returns UNKNOWN. And UNKNOWN in the WHERE clause has the same effect as FALSE. For example, try "select * from emp where comm <> null" on [oracle|http://rextester.com/l/oracle_online_compiler]. > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580184#comment-16580184 ] Shuyi Chen commented on CALCITE-2466: - Also, I've created a PR [here|https://github.com/apache/calcite/pull/792], you can take a quick look on the test cases I added and see if it makes sense. > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580180#comment-16580180 ] Shuyi Chen commented on CALCITE-2466: - Thanks a lot, [~julianhyde], in {code:java} select deptno from dept_nested where NAME <> '' AND employees <> null {code}, if NAME is empty string and employees is a valid array (non null), then it should not return empty row, right? > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
[ https://issues.apache.org/jira/browse/CALCITE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580119#comment-16580119 ] Julian Hyde commented on CALCITE-2466: -- It seems correct that that query returns 0 rows. What do you think it should return? > RexSimplify incorrectly simplify conjunction statement with null literal > > > Key: CALCITE-2466 > URL: https://issues.apache.org/jira/browse/CALCITE-2466 > Project: Calcite > Issue Type: Bug > Components: core >Reporter: Shuyi Chen >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > This can be reproduced using the following test: > {code:java} > @Test public void testFilterReduction() throws Exception { > HepProgramBuilder programBuilder = HepProgram.builder(); > programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); > HepPlanner planner = new HepPlanner(programBuilder.build()); > final String sql = "select deptno from dept_nested where NAME <> '' AND > employees <> null"; > planner.setRoot(tester.convertSqlToRel(sql).rel); > RelNode bestRel = planner.findBestExp(); > assertEquals( > "LogicalProject(DEPTNO=[$0])\n" + > " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + > "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", > RelOptUtil.toString(bestRel)); > } > {code} > In this test, > {code:java} > NAME <> '' AND employees <> null > {code} is always evaluated to false incorrectly, so the optimized plan is > {code:java} > LogicalProject(DEPTNO=[$0]) > LogicalValues(tuples=[[]]) > {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-1026) Model in YAML format
[ https://issues.apache.org/jira/browse/CALCITE-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16579889#comment-16579889 ] Sergey Nuyanzin commented on CALCITE-1026: -- Thank you for your response I think at least for historical reason JSON is "preferred". Based on the fact that in ModelHandler there is a call only to {{ObjectMapper#readValue(java.lang.String, java.lang.Class)}} from Jackson and this is the same method for both JSON and YAML and on high level they work with the same JsonRoot objects. Moreover I looked into jackson-dataformat-yaml [1] they have tests for parsing JSON/YAML so I do not think we should write tests both for JSON and YAML models each time a new model appears. But we should if the logic of detection JSON or YAML changes (that is not covered by jackson) for instance there will be added one more "inline:" like property. I would agree that splitting ModelTest makes confused. May be it makes sense not to split it but just to add several tests inside ModelTest to check if JSON/YAML format is detected correctly. Agree with necessity of docs updates at least the mentioned one [https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters]. Will update it. Agree on a point about line windows/linux endings - will think about tests against it. [1] https://github.com/FasterXML/jackson-dataformat-yaml > Model in YAML format > > > Key: CALCITE-1026 > URL: https://issues.apache.org/jira/browse/CALCITE-1026 > Project: Calcite > Issue Type: Bug >Reporter: Julian Hyde >Assignee: Julian Hyde >Priority: Major > > Models must currently be in JSON. YAML is more forgiving and flexible, so we > should support YAML as a format. > Jackson (versions 2.5 and above) can read YAML files and produce the same > output as the corresponding JSON. > As part of this change, we should add an example to > http://calcite.apache.org/docs/model.html. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-1776) Implement CORR and REGR_* aggregate functions
[ https://issues.apache.org/jira/browse/CALCITE-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16579746#comment-16579746 ] Sergey Nuyanzin commented on CALCITE-1776: -- The PRs provides the second part of REGR_* functions implementation (the first was done under [CALCITE_2402|https://issues.apache.org/jira/browse/CALCITE-2402]). Here there are the rest functions * CORR * REGR_AVGX * REGR_AVGY * REGR_INTERCEPT * REGR_R2 * REGR_SLOPE * REGR_SXY > Implement CORR and REGR_* aggregate functions > - > > Key: CALCITE-1776 > URL: https://issues.apache.org/jira/browse/CALCITE-1776 > Project: Calcite > Issue Type: New Feature >Reporter: Dmitri Shtilman >Assignee: Julian Hyde >Priority: Minor > > Implement correlation coefficient aggregate: CORR > As well as the missing regression aggregates: > REGR_SLOPE, REGR_INTERCEPT, REGR_COUNT, REGR_R2, REGR_AVGX, REGR_AVGY, > REGR_SXY > For reference, REGR_SXX and REGR_SYY have been added in [CALCITE-422] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2464) Struct types are always not nullable
[ https://issues.apache.org/jira/browse/CALCITE-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16579716#comment-16579716 ] Stamatis Zampetakis commented on CALCITE-2464: -- If the example you provided is valid then it confirms that there is an issue with RelRecordType. Currently, the RelRecordType nullability does not dependent on its fields but it is always not nullable. In any case, I will have a look at the standard to see exactly what happens and I will come back to it. > Struct types are always not nullable > > > Key: CALCITE-2464 > URL: https://issues.apache.org/jira/browse/CALCITE-2464 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.17.0 >Reporter: Stamatis Zampetakis >Assignee: Julian Hyde >Priority: Major > > Struct types are always not nullable. This can lead to bugs in many parts of > Calcite (e.g., expression simplification, optimization, code generation) that > are considering the nullability of a RelDataType. > The method > [isNullable|https://github.com/apache/calcite/blob/3c6b5ec759caadabb67f09d7a4963cc7d9386d0c/core/src/main/java/org/apache/calcite/rel/type/RelRecordType.java#L55] > in the RelRecordType, which is used to represent a structured type, always > returns false. The nullability of the RelRecordType should be a parameter in > the constructor as it is the case for various other RelDataTypes. > Additionally, the data type cache should also take into account the > nullability of the type in order to return a correct equivalent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2466) RexSimplify incorrectly simplify conjunction statement with null literal
Shuyi Chen created CALCITE-2466: --- Summary: RexSimplify incorrectly simplify conjunction statement with null literal Key: CALCITE-2466 URL: https://issues.apache.org/jira/browse/CALCITE-2466 Project: Calcite Issue Type: Bug Components: core Reporter: Shuyi Chen Assignee: Julian Hyde Fix For: 1.18.0 This can be reproduced using the following test: {code:java} @Test public void testFilterReduction() throws Exception { HepProgramBuilder programBuilder = HepProgram.builder(); programBuilder.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE); HepPlanner planner = new HepPlanner(programBuilder.build()); final String sql = "select deptno from dept_nested where NAME <> '' AND employees <> null"; planner.setRoot(tester.convertSqlToRel(sql).rel); RelNode bestRel = planner.findBestExp(); assertEquals( "LogicalProject(DEPTNO=[$0])\n" + " LogicalFilter(condition=[AND(<>($1, ''), <>($3, null))])\n" + "LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])\n", RelOptUtil.toString(bestRel)); } {code} In this test, {code:java} NAME <> '' AND employees <> null {code} is always evaluated to false incorrectly, so the optimized plan is {code:java} LogicalProject(DEPTNO=[$0]) LogicalValues(tuples=[[]]) {code}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)