Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0
-
None
-
Important
Description
While fetching data from ResultSet in JDBC. I got the null pointer. Details -
java.lang.NullPointerException
at org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getString(AbstractSqlAccessor.java:101)
at org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(BoundCheckingAccessor.java:124)
at org.apache.drill.jdbc.impl.TypeConvertingSqlAccessor.getString(TypeConvertingSqlAccessor.java:649)
at org.apache.drill.jdbc.impl.AvaticaDrillSqlAccessor.getString(AvaticaDrillSqlAccessor.java:95)
at net.hydromatic.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:205)
at org.apache.drill.jdbc.impl.DrillResultSetImpl.getString(DrillResultSetImpl.java:182)
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
It should be like:
@Override
public String getString(int rowOffset) throws InvalidAccessException