drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devender Yadav (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4128) null pointer at org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getString(AbstractSqlAccessor.java:101)
Date Wed, 25 Nov 2015 05:58:10 GMT
Devender Yadav  created DRILL-4128:
--------------------------------------

             Summary: null pointer at org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getString(AbstractSqlAccessor.java:101)
                 Key: DRILL-4128
                 URL: https://issues.apache.org/jira/browse/DRILL-4128
             Project: Apache Drill
          Issue Type: Bug
          Components: Client - JDBC
    Affects Versions: 1.3.0, 1.2.0, 1.1.0, 1.0.0
            Reporter: Devender Yadav 


Below mentioned method is throwing null pointer becaue getObject(rowOffset) returns null for
null values & null.toString() is throwing null pointer.

 @Override
  public String getString(int rowOffset) throws InvalidAccessException{
    return getObject(rowOffset).toString();
  }

It should be like:

 @Override
  public String getString(int rowOffset) throws InvalidAccessException{
    return getObject(rowOffset)==null? null:getObject(rowOffset).toString();
  }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message