drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cliff Buchanan (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-561) Drill fails to parse TRIM function
Date Wed, 11 Jun 2014 21:10:02 GMT

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

Cliff Buchanan edited comment on DRILL-561 at 6/11/14 9:08 PM:
---------------------------------------------------------------

Attached patch to implement btrim as well as trim.

This patch enables productions like the following:
{code:sql}
trim(' ' FROM ' abc ')
trim(LEADING ' ' FROM ' abc ')
trim(LEADING FROM ' abc ')
trin(LEADING FROM ' abc ')
{code}
but not:
{code:sql}
trim(' abc ', ' ')
{code}
This production is supported in postgres, but is not part of SQL92 and not supported by optiq.

https://reviews.apache.org/r/22474/


was (Author: cbuchanan):
Attached patch to implement btrim as well as trim.

This patch enables productions like the following:
{code:sql}
trim(' ' FROM ' abc ')
trim(LEADING ' ' FROM ' abc ')
trim(LEADING FROM ' abc ')
trin(LEADING FROM ' abc ')
{code}
but not:
{code:sql}
trim(' abc ', ' ')
{code}
This production is supported in postgres, but is not part of SQL92 and not supported by optiq.

> Drill fails to parse TRIM function
> ----------------------------------
>
>                 Key: DRILL-561
>                 URL: https://issues.apache.org/jira/browse/DRILL-561
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.0.0
>            Reporter: Krystal
>            Assignee: Cliff Buchanan
>             Fix For: 1.0.0-BETA1
>
>         Attachments: DRILL-561.patch
>
>
> The following TRIM function failed:
> select trim(name) from voter where rownum=20;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"06ab5b53-7781-44fb-ae8f-2c986065e952"
> endpoint {
>   address: "qa-node57.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < ValidationException:[ java.lang.IndexOutOfBoundsException:
Index: 0, Size: 0 ] < IndexOutOfBoundsException:[ Index: 0, Size: 0 ]"
> ]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message