You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Russell Jurney (Created) (JIRA)" <ji...@apache.org> on 2012/02/05 03:06:53 UTC

[jira] [Created] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
-----------------------------------------------------------------------------------------

                 Key: PIG-2506
                 URL: https://issues.apache.org/jira/browse/PIG-2506
             Project: Pig
          Issue Type: Improvement
          Components: internal-udfs
    Affects Versions: 0.9.1
            Reporter: Russell Jurney


These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi commented on PIG-2506:
-------------------------------------

Can we get all the functions from the pig.udf.list and put them into the definedFunction map (with lower case)? Would that work?
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi commented on PIG-2506:
-------------------------------------

I meant to say pig.import.list - all the packages that pig looks for to resolve a function name. We can find all the udfs inside this package and insert them into definedFunctions map for name resolution. Thats just one approach to solve above problem.
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

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

That wouldn't work in all cases. In our deployment, for example, we have packages in pig.import.list that aren't necessarily on the classpath when Pig starts (they are parts of common jars we register, like elephant-bird). Also finding all udfs in a package is actually pretty tricky. We are mostly concerned with builtins here, so we can just generate that list statically and not pay the runtime cost of examining all the jars, right?
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] [Assigned] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi reassigned PIG-2506:
-----------------------------------

    Assignee: Aniket Mokashi
    
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>            Assignee: Aniket Mokashi
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Russell Jurney commented on PIG-2506:
-------------------------------------

I think we only want to ensure that lowercase works for built-ins and keywords, so that you can use all lowercase Pig except for UDFs, etc.  For many users, syntax highlighting negates the need for alternating CAPS/lower as in SQL.  So, like COUNT_STAR() -> count_star(), etc.

Hope this isn't too difficult to fix, but it is a sore spot in the language.
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: simple
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

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

Not if we want true case-insensitive matching (you don't want to define every variation on LoWeR)

Here's some scary (:-)) reflection code for finding all classes on the classpath..
http://stackoverflow.com/questions/1456930/how-do-i-read-all-classes-from-a-java-package-in-the-classpath

We could execute something along those lines at the start and every time a jar is registered, and do a case-insentive lookup in a generated Map. I assume there's a cost associated with that..

D
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: simple
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

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

Right, I figured you just want completely case-insensitive matching. But I don't know how that could be achieved.

I suppose we could rename the existing ALLCAPS udfs into their normal Java forms, and have a special-case map that maps the shouting versions to actual classes (this wouldn't work for things that aren't built into Pig, of course, since we wouldn't be able to do that translation for classes we don't know about).
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] [Assigned] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi reassigned PIG-2506:
-----------------------------------

    Assignee:     (was: Aniket Mokashi)
    
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi commented on PIG-2506:
-------------------------------------

How about making udf match case-insensitive? Wouldnt that be a better approach? We already have definedFunctions map, we just have to make it case-insensitive. Not sure if that will break something else. Comments?

If that is good idea, I can create a patch.
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

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

Not sure I understand the proposed approach. A UDF name maps to a class via reflection, and Java is case-sensitive. You could take whatever the UDF name is and lower-case it, matching only lowercased classes, but you'd miss anything that's camel-cased.
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Russell Jurney commented on PIG-2506:
-------------------------------------

I would like the camel case form and the lower form to work for all UDFs.  Not more than one lowercase match per UDF.

                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

Aniket Mokashi commented on PIG-2506:
-------------------------------------

For static approach, I think pigbootup should do the trick. One can write the define statements in a file and run it at start up.
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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] (PIG-2506) Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'

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

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

Maybe? To be honest, I don't even know what pig.udf.list does..
                
> Change LOWER and UPPER buitins so they respond to the lowercase forms 'lower' and 'upper'
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2506
>                 URL: https://issues.apache.org/jira/browse/PIG-2506
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.9.1
>            Reporter: Russell Jurney
>              Labels: builtins, fun, happy, lowercase, pants, pig, uppercase
>
> These builtins should respond to lowercase form as well.  I am tired of writing ugly upper case Pig.  My friends make fun of me.  My partner says I write code just like my Dad's SQL.  Cascading fans make fun of my upper case L's and P's.  I just don't want to write uppercase Pig anymore.  I just can't do it.

--
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