You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Bennie Schut (JIRA)" <ji...@apache.org> on 2009/06/30 15:54:47 UTC

[jira] Created: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

indexof / lastindexof / lower / replace / substring udf's
---------------------------------------------------------

                 Key: PIG-868
                 URL: https://issues.apache.org/jira/browse/PIG-868
             Project: Pig
          Issue Type: New Feature
            Reporter: Bennie Schut
            Priority: Trivial


We parse some apache logs using pig and are using some pretty simple udf's like this:

B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;

It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Assigned: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Alan Gates reassigned PIG-868:
------------------------------

    Assignee: Bennie Schut

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Assignee: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Updated: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Alan Gates updated PIG-868:
---------------------------

    Fix Version/s: 0.4.0

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Assignee: Bennie Schut
>            Priority: Trivial
>             Fix For: 0.4.0
>
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Updated: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Bennie Schut updated PIG-868:
-----------------------------

    Status: Patch Available  (was: Open)

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Commented: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

Posted by "Dmitriy V. Ryaboy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764533#action_12764533 ] 

Dmitriy V. Ryaboy commented on PIG-868:
---------------------------------------

The dateExtractor issue is addressed by PIG-1015 ; just changing the testcase is not sufficient, as the testcase will still break in some parts of the world because it relies on local settings.

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Commented: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726040#action_12726040 ] 

Hudson commented on PIG-868:
----------------------------

Integrated in Pig-trunk #491 (See [http://hudson.zones.apache.org/hudson/job/Pig-trunk/491/])
    : added strin manipulation functions (bennies via olgan)


> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Updated: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Olga Natkovich updated PIG-868:
-------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Commented: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725681#action_12725681 ] 

Olga Natkovich commented on PIG-868:
------------------------------------

patch committed. Thanks, Bennie for contributing!

I did not commit the DateExtractor patch. I need to look into it some more but it is clearly unrelated to your contribution

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Updated: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Bennie Schut updated PIG-868:
-----------------------------

    Attachment: addSomeUDFsPatch.patch

Some udf's including unittests.

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Commented: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725676#action_12725676 ] 

Olga Natkovich commented on PIG-868:
------------------------------------

Thanks, Bennie, I am looking at the patch

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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


[jira] Updated: (PIG-868) indexof / lastindexof / lower / replace / substring udf's

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

Bennie Schut updated PIG-868:
-----------------------------

    Attachment: dateExtractorPatch.patch

dateExtractor unittest gave a failure on my machine on the -0600 time zone returning the wrong date.  A bit unrelated to the other patch but I fixed it to get piggybank unittests to work.

> indexof / lastindexof / lower / replace / substring udf's
> ---------------------------------------------------------
>
>                 Key: PIG-868
>                 URL: https://issues.apache.org/jira/browse/PIG-868
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Bennie Schut
>            Priority: Trivial
>         Attachments: addSomeUDFsPatch.patch, dateExtractorPatch.patch
>
>
> We parse some apache logs using pig and are using some pretty simple udf's like this:
> B = FOREACH A GENERATE substring(uri, lastindexof(uri, '/')+1, indexof(uri, '.txt')) as lang;
> It's pretty simple stuff but I figured someone else might find it useful.

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