You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Namit Jain (JIRA)" <ji...@apache.org> on 2009/07/16 02:43:14 UTC

[jira] Created: (HIVE-642) udf equivalent to string split

udf equivalent to string split
------------------------------

                 Key: HIVE-642
                 URL: https://issues.apache.org/jira/browse/HIVE-642
             Project: Hadoop Hive
          Issue Type: New Feature
          Components: Query Processor
            Reporter: Namit Jain
            Assignee: Emil Ibrishimov
             Fix For: 0.4.0


It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Emil Ibrishimov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733747#action_12733747 ] 

Emil Ibrishimov commented on HIVE-642:
--------------------------------------

There are some easy (compromise) ways to optimize split:

1. Check if the regex argument actually contains some "regex specific characters" and if it doesn't, do a straightforward split without converting to strings.
2. Assume some default value for the second argument (for example - split(str) to be equivalent to split(str, ' ') and optimize for this value
3. Have two separate split functions - one that does regex and one that splits around plain text.

I think that 1 is a good choice and can be done rather quickly.

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Min Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733641#action_12733641 ] 

Min Zhou commented on HIVE-642:
-------------------------------

It's very useful for us . 
some comments:
# Can you implement it directly with Text ? Avoiding string  decoding and encoding would be faster.  Of course that trick may lead to another problem, as String.split uses a regular expression for splitting.
# getDisplayString() always return a  string in lowercase. 

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733766#action_12733766 ] 

Namit Jain commented on HIVE-642:
---------------------------------

filed

https://issues.apache.org/jira/browse/HIVE-664



> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733630#action_12733630 ] 

Namit Jain commented on HIVE-642:
---------------------------------

+1

looks good

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Emil Ibrishimov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733755#action_12733755 ] 

Emil Ibrishimov commented on HIVE-642:
--------------------------------------

Some Generic UDFs don't return lowercase (getDisplayString()) - when, case, coalesce

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Raghotham Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733435#action_12733435 ] 

Raghotham Murthy commented on HIVE-642:
---------------------------------------

You probably have to check for null strings (different from empty strings) and return null.

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-642) udf equivalent to string split

Posted by "Emil Ibrishimov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emil Ibrishimov updated HIVE-642:
---------------------------------

    Attachment: HIVE-642.1.patch

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-642) udf equivalent to string split

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-642:
----------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed. Thanks Emil

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-642) udf equivalent to string split

Posted by "Emil Ibrishimov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emil Ibrishimov updated HIVE-642:
---------------------------------

    Status: Patch Available  (was: Open)

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-642) udf equivalent to string split

Posted by "Emil Ibrishimov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emil Ibrishimov updated HIVE-642:
---------------------------------

    Attachment: HIVE-642.2.patch

Oops, fixed. Thanks!

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733750#action_12733750 ] 

Namit Jain commented on HIVE-642:
---------------------------------

I saw Min's comments after committing.

I can file a follow-up jira on that

> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-642) udf equivalent to string split

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735446#action_12735446 ] 

Zheng Shao commented on HIVE-642:
---------------------------------

I noticed some of the new UDFs that got added are not listed in http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF
Can we add those to the wiki?


> udf equivalent to string split
> ------------------------------
>
>                 Key: HIVE-642
>                 URL: https://issues.apache.org/jira/browse/HIVE-642
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Emil Ibrishimov
>             Fix For: 0.4.0
>
>         Attachments: HIVE-642.1.patch, HIVE-642.2.patch
>
>
> It would be very useful to have a function equivalent to string split in java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.