[
https://issues.apache.org/jira/browse/DRILL-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363621#comment-14363621
]
Daniel Barclay (Drill) commented on DRILL-2463:
-----------------------------------------------
Which lower layer(s) should return null and which should throw an exception
when the requested value is logically NULL?
(The intended calling contracts aren't clear.)
Currently, if I remove the newly added null check from
AvaticaDrillSqlAccessor.getString(...), I get an assertion error:
java.lang.AssertionError: Tried to get null value
at
org.apache.drill.exec.vector.NullableVarCharVector$Accessor.get(NullableVarCharVector.java:347)
at
org.apache.drill.exec.vector.accessor.NullableVarCharAccessor.getBytes(NullableVarCharAccessor.java:111)
at
org.apache.drill.exec.vector.accessor.NullableVarCharAccessor.getString(NullableVarCharAccessor.java:121)
at
org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(BoundCheckingAccessor.java:113)
at
org.apache.drill.jdbc.AvaticaDrillSqlAccessor.getString(AvaticaDrillSqlAccessor.java:69)
at
net.hydromatic.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:270)
at
org.apache.drill.jdbc.DatabaseMetaDataGetColumnsTest.test_SCOPE_CATALOG_hasRightValue_BOOLEAN(DatabaseMetaDataGetColumnsTest.java:2444)
...
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
...
If AvaticaDrillSqlAccessor.getString(...) shouldn't need to call the next
layer's isNull(...), then which layer should return null (before we get to the
assert statement)?
> Implement JDBC NULL -> dummy value mapping in AvaticaDrillSqlAccessor
> ---------------------------------------------------------------------
>
> Key: DRILL-2463
> URL: https://issues.apache.org/jira/browse/DRILL-2463
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Daniel Barclay (Drill)
> Assignee: Daniel Barclay (Drill)
> Attachments: DRILL-2463.1.patch.txt, DRILL-2463.2.patch.txt
>
>
> Fix AvaticaDrillSqlAccessor to implement returning of 0 from
> ResultSet.getInt(...) for logical NULL values, etc.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)