[
https://issues.apache.org/jira/browse/PHOENIX-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14496911#comment-14496911
]
Abhishek Sreenivasa commented on PHOENIX-1707:
----------------------------------------------
I'm not able to reproduce the issue with 4.3. It is possible that I'm running
into another problem altogether that's masking the repro of this issue.
Here's my table:
DROP TABLE IF EXISTS ALARMSHISTORY;
CREATE TABLE IF NOT EXISTS
ALARMSHISTORY (ID VARCHAR NOT NULL PRIMARY KEY,
REGDATE UNSIGNED_DATE,
REGDATE_SIGNED DATE);
Doing a "!describe ALARMSHISTORY" returns both REGDATE and REGDATE_SIGNED as
having sqlType 91 which corresponds to a signed date although I explicitly
asked REGDATE to be unsigned (has sqlType 19).
> Compare (where) DATE<> UNSIGNED_DATE raise NPE
> ----------------------------------------------
>
> Key: PHOENIX-1707
> URL: https://issues.apache.org/jira/browse/PHOENIX-1707
> Project: Phoenix
> Issue Type: Bug
> Environment: Phoenix 4.3, hbase 0.98.6
> Reporter: Lavrenty Eskin
> Assignee: Abhishek Sreenivasa
> Labels: Newbie
>
> select
> FLOOR(REGDATE, 'DAY'), <<== UNSIGNED_DATE
> TO_DATE('2015-03-06', 'yyyy-MM-dd') <<== DATE
> from
> "ALARMSHISTORY" as "ALARMSHISTORY"
> where
> FLOOR(REGDATE, 'DAY') = TO_DATE('2015-03-06', 'yyyy-MM-dd'); <<== raise
> java.lang.NullPointerException
> (!) There are no NULLs in REGDATE
> Ways to resolve:
> a) Implement TO_UNSIGNED_DATE function
> b) Implement correct compare function DATE<> UNSIGNED_DATE
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)