[
https://issues.apache.org/jira/browse/DRILL-3477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619768#comment-14619768
]
Jacques Nadeau edited comment on DRILL-3477 at 7/9/15 2:35 AM:
---------------------------------------------------------------
Hmm... wondering what other ramifications are.
- Need to modify c++ client (I guess)
- Wonder about how it should be exposed in ODBC and JDBC. (or before?)
I'm wondering what issues we'll uncover if we change this to VarBinary. Did
testing all go through with a hiccup? Although, I'm not sure what negative
test-cases we have about selecting null columns. I am also wondering about
overhead.
was (Author: jnadeau):
Hmm... wondering what other ramifications are.
- Need to modify c++ client (I guess)
- Wonder about how it should be exposed in ODBC and JDBC. (or before?)
I'm wondering what issues we'll uncover if we change this. Did testing all go
through with a hiccup? Although, I'm not sure what negative test-cases we have
about selecting null columns. I am also wondering about overhead.
> Using IntVector for null expressions causes problems with implicit cast
> -----------------------------------------------------------------------
>
> Key: DRILL-3477
> URL: https://issues.apache.org/jira/browse/DRILL-3477
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Steven Phillips
> Assignee: Jinfeng Ni
>
> See DRILL-3353, for example.
> A simple example is this:
> {code}
> select * from t where a = 's';
> {code}
> If the first batch scanned from table t does not contain the column a, the
> expression materializer in Project defaults to Nullable Int as the type. The
> Filter then sees an Equals expression between a VarChar and an Int type, so
> it does an implicit cast. Implicit cast rules give Int higher precedence, so
> the literal 's' is cast to Int, which ends up throwing a
> NumberFormatException.
> In the class ResolverTypePrecedence, we see that Null type has the lowest
> precedence, which makes sense. But since we don't actually currently have an
> implementation for NullVector, we should materialize the Null type as the
> Vector with the lowest possible precedence, which is VarBinary.
> My suggestion is that we should use VarBinary as the default type in
> ExpressionMaterializer instead of Int.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)