Bug 1252005 - HBase translator - NPE if date value is 'null'
HBase translator - NPE if date value is 'null'
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: 6.2.0
Assigned To: Van Halbert
Juraj Duráni
: QA-Closed
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 09:28 EDT by Juraj Duráni
Modified: 2016-02-10 03:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Hbase: 1.1.1 Phoenix: 4.5.0-HBase-1.1
Last Closed: 2016-02-10 03:54:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Server log (5.81 KB, text/plain)
2015-08-10 09:28 EDT, Juraj Duráni
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIID-3616 Major Resolved HBase translator - NPE if date value is 'null' 2015-09-15 17:52:25 EDT

  None (edit)
Description Juraj Duráni 2015-08-10 09:28:41 EDT
Created attachment 1061069 [details]
Server log

Describe the issue: 
If the source table in HBase contains a 'NULL' date value, Teiid throws an NPE. I did not encounter any NPE using org.apache.phoenix.jdbc.PhoenixDriver [1]. Other data types seem to be OK too.
I have tried integer, char, varchar, float, double, tinyint, smallint, bigint, decimal, varbinary, boolean, time, date, timestamp.

[1]
Connection con = new org.apache.phoenix.jdbc.PhoenixDriver().connect("jdbc:phoenix:localhost", new Properties())
ResultSet rs = con.createStatement().executeQuery("select datevalue from smalla");
while(rs.next())
{ System.out.println(rs.getDate(1)); } 


Steps to reproduce:


HBase table:
create table smalla(intkey integer primary key,stringkey varchar(10),intnum integer,stringnum varchar(10),floatnum float,longnum bigint,doublenum float,bytenum tinyint,datevalue date,timevalue time,timestampvalue timestamp,booleanvalue boolean,charvalue char(1),shortvalue smallint,bigintegervalue decimal(20,0),bigdecimalvalue decimal(25,5),objectvalue varchar(500));

VDB table:
CREATE FOREIGN TABLE SmallA (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum long,
DoubleNum double,
ByteNum byte,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char,
ShortValue short,
BigIntegerValue biginteger,
BigDecimalValue bigdecimal,
ObjectValue object) OPTIONS (CARDINALITY 50, UPDATABLE 'TRUE');

Note You need to log in before you can comment on or make changes to this bug.