drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2943) Drill parsing error during deserialization for an Order-By
Date Sun, 03 May 2015 15:24:06 GMT

    [ https://issues.apache.org/jira/browse/DRILL-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14525870#comment-14525870
] 

Jacques Nadeau commented on DRILL-2943:
---------------------------------------

I think you have a bug here.  I think instead of: 
{code}
  :  Int ('.' Digit*)? ('e' | 'E' ('+' | '-')? Digit*)?
{code}

You should have 
{code}
  :  Int ('.' Digit*)? (('e' | 'E') ('+' | '-')? Digit*)?
{code}

I suggest you add two unit tests directly against ExprParser rather than stepping through
all the code (one with big e and one with little).  You can use code similar to these locations:

https://github.com/apache/drill/blob/master/common/src/main/java/org/apache/drill/common/expression/LogicalExpression.java#L76
https://github.com/apache/drill/blob/master/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java

> Drill parsing error during deserialization for an Order-By
> ----------------------------------------------------------
>
>                 Key: DRILL-2943
>                 URL: https://issues.apache.org/jira/browse/DRILL-2943
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - RPC
>    Affects Versions: 0.9.0
>            Reporter: Aman Sinha
>            Assignee: Mehant Baid
>             Fix For: 1.0.0
>
>         Attachments: 0001-DRILL-2943-Parse-uppercase-E-for-scientific-notation.patch
>
>
> When doing an order-by of values that have a multiplicative floating-point constant,
the jackson deserialization errors out due to the 'E' in the exponent representation. 
> {code}
> alter session set `planner.slice_target` = 1;
> select c_acctbal * 0.0001 as x from cp.`tpch/customer.parquet` order by x;
> {code}
> {code}
> Caused by: com.fasterxml.jackson.databind.JsonMappingException: Expression has syntax
error! line 1:25:mismatched input 'E' expecting CParen (through reference chain: java.util.ArrayList[0])
> 	com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210)
~[jackson-databind-2.4.3.jar:2.4.3]
> 	com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:189)
~[jackson-databind-2.4.3.jar:2.4.3]
> 	com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
~[jackson-databind-2.4.3.jar:2.4.3]
> 	com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:206)
~[jackson-databind-2.4.3.jar:2.4.3]
> {code}



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

Mime
View raw message