You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2009/03/25 21:03:57 UTC

[jira] Created: (PIG-734) Non-string keys in maps

Non-string keys in maps
-----------------------

                 Key: PIG-734
                 URL: https://issues.apache.org/jira/browse/PIG-734
             Project: Pig
          Issue Type: Bug
    Affects Versions: 1.0.0
            Reporter: Alan Gates
            Assignee: Alan Gates
            Priority: Minor
             Fix For: 1.1.0


With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).

So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Hudson commented on PIG-734:
----------------------------

Integrated in Pig-trunk #484 (See [http://hudson.zones.apache.org/hudson/job/Pig-trunk/484/])
    :  Changed maps to only take strings as keys.


> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Alan Gates commented on PIG-734:
--------------------------------

I wasn't planning on making mymap#1 translate to mymap#'1'.  The issue I see with that is if that works, why doesn't mymap#intcol work?  I'm concerned that sayings keys need to be strings but then cheating in this one case will make the semantics confusing.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Attachment: PIG-734.patch

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Yiping Han commented on PIG-734:
--------------------------------

Then why not just to restrict all the keys to be of the same type? I don't see the point that different records should have different key types. But I do see the point that people may want to use non-string type of keys.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Hadoop QA commented on PIG-734:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12411133/PIG-734_2.patch
  against trunk revision 785450.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 63 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 2 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/92/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/92/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/92/console

This message is automatically generated.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Alan Gates commented on PIG-734:
--------------------------------

For serialization, a type discovery has to happen on every key, because there's no guarantee that every key is of the same type.  By forcing all keys to strings we're eliminating this step, thus speeding the serialization significantly.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Attachment: PIG-734_3.patch

Attaching a version of the file that fixes some of the introduced compiler warnings.  The findbugs warnings have to do with naming convention.  All of the function names in QueryParser start with upper case, so I am only following the convention there.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Attachment: PIG-734_2.patch

New version of the patch, brought up to date with current trunk.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Alan Gates commented on PIG-734:
--------------------------------

Changing maps to allow the user to specify a type would be significantly more work.  Also, it would be a bigger disruption in the interface, since users would now have to declare a key type.  We could say the type default to string if the user doesn't declare a type.

Nothing prevents us from eventually supporting other declared types for the key, with string as the default.  However, as noted in the original description, it will make types translations in non-java UDFs much more painful, so it's not clear to me that we would want to do it.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

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

Patch checked in.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Fix Version/s:     (was: 0.3.0)
                   0.4.0
           Status: Patch Available  (was: Open)

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Status: Patch Available  (was: Open)

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Issue Comment Edited: (PIG-734) Non-string keys in maps

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

Yiping Han edited comment on PIG-734 at 5/7/09 2:10 PM:
--------------------------------------------------------

I don't get the serializing part. I would expect the type-checking just happen once, would that be a performance problem?

Actually we are thinking if we should switch to integer key to save space.

I wouldn't post strong against to this rollback, but I don't see a significant reason for dong that.

      was (Author: yhan):
    I don't get the serializing part. I would expect the type-checking just happen once, would that be a performance problem.

Actually we are thinking if we sould switch to integer key for saving space.

I wouldn't post strong against to this rollback, but I don't see a significant reason for dong that.
  
> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Status: Patch Available  (was: Open)

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Yiping Han commented on PIG-734:
--------------------------------

I don't get the serializing part. I would expect the type-checking just happen once, would that be a performance problem.

Actually we are thinking if we sould switch to integer key for saving space.

I wouldn't post strong against to this rollback, but I don't see a significant reason for dong that.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

David Ciemiewicz commented on PIG-734:
--------------------------------------

Alan, if I don't think this is going to be that problematic.

Even if I try to pass in a map dereference with an integer such as mymap#1, would pig automagically convert the 1 to a string equivalent to mymap#'1'.  If so, I think this would be quite acceptable.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Status: Open  (was: Patch Available)

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Hadoop QA commented on PIG-734:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12407585/PIG-734.patch
  against trunk revision 772750.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 63 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    -1 javac.  The applied patch generated 228 javac compiler warnings (more than the trunk's current 225 warnings).

    -1 findbugs.  The patch appears to introduce 7 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/32/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/32/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/32/console

This message is automatically generated.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Daniel Dai commented on PIG-734:
--------------------------------

Patch looks good to me.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Updated: (PIG-734) Non-string keys in maps

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

Alan Gates updated PIG-734:
---------------------------

    Status: Open  (was: Patch Available)

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.3.0
>
>         Attachments: PIG-734.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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


[jira] Commented: (PIG-734) Non-string keys in maps

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

Hadoop QA commented on PIG-734:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12411160/PIG-734_3.patch
  against trunk revision 785450.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 63 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 2 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/93/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/93/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/93/console

This message is automatically generated.

> Non-string keys in maps
> -----------------------
>
>                 Key: PIG-734
>                 URL: https://issues.apache.org/jira/browse/PIG-734
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: PIG-734.patch, PIG-734_2.patch, PIG-734_3.patch
>
>
> With the addition of types to pig, maps were changed to allow any atomic type to be a key.  However, in practice we do not see people using keys other than strings.  And allowing multiple types is causing us issues in serializing data (we have to check what every key type is) and in the design for non-java UDFs (since many scripting languages include associative arrays such as Perl's hash).
> So I propose we scope back maps to only have string keys.  This would be a non-compatible change.  But I am not aware of anyone using non-string keys, so hopefully it would have little or no impact.

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