[ 
https://issues.apache.org/jira/browse/DRILL-4341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oscar Morante closed DRILL-4341.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.8.0

This is now working.  I'm not sure when it got fixed but it's working just fine 
on master 18e16610ab446e1f435db35dd6dce60c0be0d07a.

> Fails to parse string literals containing escaped quotes
> --------------------------------------------------------
>
>                 Key: DRILL-4341
>                 URL: https://issues.apache.org/jira/browse/DRILL-4341
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>            Reporter: Oscar Morante
>             Fix For: 1.8.0
>
>
> In some situations, Drill fails to parse strings with escaped single quotes.  
> Just changing the last line of this query makes the problem appear and 
> disappear (without touching the string it's complaining about):
> {code:sql}
> select
>   'yyyy-MM-dd''T''HH:mm:ss.SSS''Z'''
> from
>   s3; --> FAILS
>   --s3.`2015`; --> FAILS
>   --s3.`2015/11`; --> FAILS
>   --s3.`2015/11/3`; --> WORKS
>   --s3.`2015/11/3/10-1072045-1612661.json.gz`; --> WORKS
>   --(select * from s3 limit 1); --> WORKS
>   --(select * from s3.`2015` limit 1); --> WORKS
>   --(select * from s3.`2015/11` limit 1); --> WORKS
> {code}
> This is the error when it fails:
> {code}
> ExampleExceptionFormatter: exception message was: SYSTEM ERROR: 
> ExpressionParsingException: Expression has syntax error! line 1:12:missing 
> EOF at 'T'
> Fragment 1:1
> {code}
> This is very important when dealing with json files containing dates encoded 
> as iso-8601 strings.  My current workaround is something like this:
> {code:sql}
> select to_timestamp(regexp_replace(`timestamp`, '[TZ]', ''),
>                     'yyyy-MM-ddHH:mm:ss.SSS')
> from s3;
> {code}



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

Reply via email to