You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kevin Wilfong (Created) (JIRA)" <ji...@apache.org> on 2012/04/10 22:27:20 UTC
[jira] [Created] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
-------------------------------------------------------------------------------------
Key: HIVE-2942
URL: https://issues.apache.org/jira/browse/HIVE-2942
Project: Hive
Issue Type: Bug
Reporter: Kevin Wilfong
Assignee: Kevin Wilfong
After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
E.g.
select substr(str, 1) from table1;
now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Paul Yang (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Yang updated HIVE-2942:
----------------------------
Resolution: Fixed
Fix Version/s: 0.10
Status: Resolved (was: Patch Available)
Whoops, forgot to mention that I was running the tests too - sorry Namit. They passed, and I committed. Thanks Kevin!
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Fix For: 0.10
>
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Namit Jain (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254459#comment-13254459 ]
Namit Jain commented on HIVE-2942:
----------------------------------
+1
running tests
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252959#comment-13252959 ]
Phabricator commented on HIVE-2942:
-----------------------------------
pauly has accepted the revision "HIVE-2942 [jira] substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException".
+1
REVISION DETAIL
https://reviews.facebook.net/D2727
BRANCH
svn
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Kevin Wilfong (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Wilfong updated HIVE-2942:
--------------------------------
Status: Patch Available (was: Open)
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HIVE-2942:
------------------------------
Attachment: HIVE-2942.D2727.1.patch
kevinwilfong requested code review of "HIVE-2942 [jira] substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException".
Reviewers: JIRA
https://issues.apache.org/jira/browse/HIVE-2942
Fixed UDFSubstr so that for strings, the substr now succeeds if there is a UTF-8 character by using the string length instead of the Text length.
Also, updated QTestUtil so that we can now write tests which include UTF-8 characters.
After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
E.g.
select substr(str, 1) from table1;
now fails with that exception if str contains a UTF-8 character for any row in the table.
TEST PLAN
EMPTY
REVISION DETAIL
https://reviews.facebook.net/D2727
AFFECTED FILES
ql/src/test/results/clientpositive/udf_substr.q.out
ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
ql/src/test/queries/clientpositive/udf_substr.q
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSubstr.java
MANAGE HERALD DIFFERENTIAL RULES
https://reviews.facebook.net/herald/view/differential/
WHY DID I GET THIS EMAIL?
https://reviews.facebook.net/herald/transcript/6219/
Tip: use the X-Herald-Rules header to filter Herald messages in your client.
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2942) substr on string containing UTF-8
characters produces StringIndexOutOfBoundsException
Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251744#comment-13251744 ]
Phabricator commented on HIVE-2942:
-----------------------------------
kevinwilfong has commented on the revision "HIVE-2942 [jira] substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException".
Verified all the tests still pass.
REVISION DETAIL
https://reviews.facebook.net/D2727
> substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException
> -------------------------------------------------------------------------------------
>
> Key: HIVE-2942
> URL: https://issues.apache.org/jira/browse/HIVE-2942
> Project: Hive
> Issue Type: Bug
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2942.D2727.1.patch
>
>
> After HIVE-2792, the substr function produces a StringIndexOutOfBoundsException when called on a string containing UTF-8 characters without the length argument being present.
> E.g.
> select substr(str, 1) from table1;
> now fails with that exception if str contains a UTF-8 character for any row in the table.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira