Hi James, would the literalExpression.getDataType actually returns null 
in any cases?

On 03/06/2013 01:04 PM, James Taylor wrote:
>
> In src/main/java/com/salesforce/phoenix/compile/UpsertCompiler.java:
>
> > @@ -348,10 +348,13 @@ public ExplainPlan getExplainPlan() throws SQLException {
> >                  PColumn column = allColumns.get(columnIndexes[nodeIndex]);
> >                  expressionBuilder.setColumn(column);
> >                  LiteralExpression literalExpression = (LiteralExpression)valueNode.accept(expressionBuilder);
> > -                if (literalExpression.getDataType() != null && !literalExpression.getDataType().isCoercibleTo(column.getDataType(), literalExpression.getValue(), literalExpression.getBytes())) {
> > +                // Check for type compatibility.
> > +                if (literalExpression.getDataType() != null
>
> Let's just move the above check in there so we can get rid of the 
> isCoercibleTo method that accepts byte[] and Object
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/79/files#r3269463>.
>