[jira] [Commented] (CALCITE-2099) generated code compile error when sql has union and aggregation
[ https://issues.apache.org/jira/browse/CALCITE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360592#comment-16360592 ] zhen wang commented on CALCITE-2099: https://github.com/apache/calcite/pull/625 created. [~julianhyde] let me know your comments > generated code compile error when sql has union and aggregation > --- > > Key: CALCITE-2099 > URL: https://issues.apache.org/jira/browse/CALCITE-2099 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.15.0 >Reporter: jiatao.tao >Assignee: Julian Hyde >Priority: Major > > Hi, [~julianhyde], add these tests in CsvTest > {code:java} > // fail > @Test > public void test0() throws SQLException { > sql("model", "select count(*) from EMPS group by NAME union select > count(*) from EMPS group by NAME").ok(); > } > // fail > @Test > public void test1() throws SQLException { > sql("model", "select sum(AGE) from EMPS group by NAME union select > sum(AGE) from EMPS group by NAME").ok(); > } > // this is ok > @Test > public void test2() throws SQLException { > sql("model", "select count(*), NAME from EMPS group by NAME union > select count(*), NAME from EMPS group by NAME").ok(); > } > {code} > and will throw exception:Caused by: > org.codehaus.commons.compiler.CompileException: Line 202, Column 17: No > applicable constructor/method found for actual parameters "java.lang.String, > java.lang.Integer"; candidates are: "Baz$Record2_1()" > Hoping for your reply. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2099) generated code compile error when sql has union and aggregation
[ https://issues.apache.org/jira/browse/CALCITE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16297808#comment-16297808 ] jiatao.tao commented on CALCITE-2099: - Record2_1's constructor had no params, but the place use it has two params. > generated code compile error when sql has union and aggregation > --- > > Key: CALCITE-2099 > URL: https://issues.apache.org/jira/browse/CALCITE-2099 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.15.0 >Reporter: jiatao.tao >Assignee: Julian Hyde > > Hi, [~julianhyde], add these tests in CsvTest > {code:java} > // fail > @Test > public void test0() throws SQLException { > sql("model", "select count(*) from EMPS group by NAME union select > count(*) from EMPS group by NAME").ok(); > } > // fail > @Test > public void test1() throws SQLException { > sql("model", "select sum(AGE) from EMPS group by NAME union select > sum(AGE) from EMPS group by NAME").ok(); > } > // this is ok > @Test > public void test2() throws SQLException { > sql("model", "select count(*), NAME from EMPS group by NAME union > select count(*), NAME from EMPS group by NAME").ok(); > } > {code} > and will throw exception:Caused by: > org.codehaus.commons.compiler.CompileException: Line 202, Column 17: No > applicable constructor/method found for actual parameters "java.lang.String, > java.lang.Integer"; candidates are: "Baz$Record2_1()" > Hoping for your reply. -- This message was sent by Atlassian JIRA (v6.4.14#64029)