[
https://issues.apache.org/jira/browse/PHOENIX-2393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190151#comment-15190151
]
Josh Elser commented on PHOENIX-2393:
-------------------------------------
Just tested this out with 4.7.0-HBase-1.1 and Calcite 1.7.0-SNAPSHOT and I'm
not seeing this issue.
The stack trace looks like the Calendar passed from Avatica into the
PhoenixResultSet was null. If this was Phoenix 4.5.0, I'm guessing it was
Calcite 1.2.0-incubating. As such, CALCITE-677 might have been what fixed it,
but I'm not 100% sure.
Going to close this one out, but let us know if you're still running into it
with 4.7.0, [~kliew].
> Cannot retrieve null dates
> --------------------------
>
> Key: PHOENIX-2393
> URL: https://issues.apache.org/jira/browse/PHOENIX-2393
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.5.0
> Reporter: Kevin Liew
> Labels: phoenix, verify
>
> Create a table
> {noformat}
> DROP TABLE IF EXISTS Date_Table;
> CREATE TABLE IF NOT EXISTS Date_Table(
> KeyColumn CHAR(255) PRIMARY KEY,
> Column1 DATE);
> {noformat}
> Import a csv containing a null date
> {noformat}
> "Null",
> {noformat}
> Try any 'select' query on the table that is expected to include the null date
> row.
> {noformat}
> select * from date_table
> {noformat}
> The server logs
> {noformat}
> 2015-11-09 21:30:57,053 WARN org.eclipse.jetty.server.HttpChannel: /
> java.lang.NullPointerException
> at java.util.Calendar.setTime(Calendar.java:1106)
> at
> org.apache.phoenix.jdbc.PhoenixResultSet.getDate(PhoenixResultSet.java:386)
> at
> org.apache.calcite.avatica.jdbc.JdbcResultSet.getValue(JdbcResultSet.java:107)
> at
> org.apache.calcite.avatica.jdbc.JdbcResultSet.frame(JdbcResultSet.java:77)
> at org.apache.calcite.avatica.jdbc.JdbcMeta.fetch(JdbcMeta.java:770)
> at
> org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:163)
> at
> org.apache.calcite.avatica.remote.Service$FetchRequest.accept(Service.java:330)
> at
> org.apache.calcite.avatica.remote.Service$FetchRequest.accept(Service.java:304)
> at
> org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:43)
> at
> org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:55)
> at
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:497)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)