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

Julian Hyde commented on CALCITE-2283:
--------------------------------------

Ah, I see. Dynamic tests look quite nice.

Quidem has a mechanism to go into 'no-op' mode (see the {{boolean skip}} field 
in {{class Quidem}}). Maybe that could be leveraged to build dynamic tests.

> aggregate over empty set , throw java.lang.NullPointerException
> ---------------------------------------------------------------
>
>                 Key: CALCITE-2283
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2283
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.16.0
>            Reporter: foxes
>            Assignee: Julian Hyde
>            Priority: Major
>
> {code:java}
> //代码
> String sql = 
>         "select " +
>         "         count(distinct(bill_id)) as FULLY_REPAY_BILLS2_LST6 ," +
>         "         count(last_month) . as FULLY_REPAY_MONTHS_LST6 " +
>         "from  "  +
>         "         cardBill " +
>         "WHERE   " +
>         "         1=2 ";
> ResultSet result = st.executeQuery(sql.toUpperCase());
> result.next();// this  throw NullPointerException
> {code}
> {code:java}
>  
> Exception in thread "main" java.lang.NullPointerException
> at Baz$4$1.current(Unknown Source)
> at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:688)
> at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:207)
> at 
> com.terry.netease.calcite.test.test.TestMemoryQuery.main(TestMemoryQuery.java:84)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to