hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-17077) Hive should raise StringIndexOutOfBoundsException when LPAD/RPAD len character's value is negative number
Date Tue, 16 Jun 2020 16:56:02 GMT

     [ https://issues.apache.org/jira/browse/HIVE-17077?focusedWorklogId=446713&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-446713
]

ASF GitHub Bot logged work on HIVE-17077:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jun/20 16:55
            Start Date: 16/Jun/20 16:55
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] commented on pull request #203:
URL: https://github.com/apache/hive/pull/203#issuecomment-644888117


   This pull request has been automatically marked as stale because it has not had recent
activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 446713)
    Remaining Estimate: 0h
            Time Spent: 10m

> Hive should raise StringIndexOutOfBoundsException when LPAD/RPAD len character's value
is negative number
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-17077
>                 URL: https://issues.apache.org/jira/browse/HIVE-17077
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Lingang Deng
>            Assignee: Lingang Deng
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> lpad(rpad) throw a exception when the second argument a negative number, as follows,
> {code:java}
> hive> select lpad("hello", -1 ,"h");
> FAILED: StringIndexOutOfBoundsException String index out of range: -1
> hive> select rpad("hello", -1 ,"h");
> FAILED: StringIndexOutOfBoundsException String index out of range: -1
> {code}
> Maybe we should return friendly result such as mysql.
> {code:java}
> mysql> select lpad("hello", -1 ,"h");
> +----------------------+
> | lpad("hello", -1 ,"h") |
> +----------------------+
> | NULL                 |
> +----------------------+
> 1 row in set (0.00 sec)
> mysql> select rpad("hello", -1 ,"h");
> +----------------------+
> | rpad("hello", -1 ,"h") |
> +----------------------+
> | NULL                 |
> +----------------------+
> 1 row in set (0.00 sec)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message