Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-734

Non-string keys in maps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.2.0
    • 0.4.0
    • None
    • None

    Description

      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.

      Attachments

        1. PIG-734.patch
          50 kB
          Alan Gates
        2. PIG-734_3.patch
          57 kB
          Alan Gates
        3. PIG-734_2.patch
          56 kB
          Alan Gates

        Activity

          People

            gates Alan Gates
            gates Alan Gates
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: