drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (DRILL-575) RPAD/LPAD functions fails when padded string is not specified
Date Wed, 15 Mar 2017 17:52:41 GMT

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

Krystal closed DRILL-575.
-------------------------

Bug was verified.

> RPAD/LPAD functions fails when padded string is not specified
> -------------------------------------------------------------
>
>                 Key: DRILL-575
>                 URL: https://issues.apache.org/jira/browse/DRILL-575
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.0.0
>            Reporter: Krystal
>             Fix For: 0.4.0
>
>         Attachments: DRILL-575.patch
>
>
> In oracle and postgres, rpad and lpad functions defaults to spaces when str2 is not specified
- rpad(str1, length [, str2]).  For example in oracle:
> SQL> select rpad(name,20) from voter where voter_id=10;
> RPAD(NAME,20)
> --------------------
> tom underhill
> SQL> select lpad(name,20) from voter where voter_id=10;
> LPAD(NAME,20)
> --------------------
>        tom underhill
> In drill, the queries fail because the str2 parameter is required:
> 0: jdbc:drill:schema=dfs> relect lpad(name, 20) from voter where voter_id=10;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"dde5cf1c-1d05-46c4-902a-c4bd6621c065"
> endpoint {
>   address: "qa-node57.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < SqlParseException:[ Non-query expression encountered
in illegal context ] < EigenbaseException:[ Non-query expression encountered in illegal
context ]"
> ]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message