git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2283) aggregate over empty set , throw java.lang.NullPointerException


foxes created CALCITE-2283:
------------------------------

             Summary: 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


{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)