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

Bug in Schema.getPigSchema(ResourceSchema rSchema) improperly adds two level access

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.2, 0.10.0, 0.11
    • 0.9.2, 0.10.0, 0.11
    • None
    • None

    Description

      If you do this:
      Schema s1=Utils.getSchemaFromString("b:bag

      {t:tuple(name:chararray,age:int)}

      ");
      Schema s2=Schema.getPigSchema(new ResourceSchema(s1));
      System.out.println(s1.equals(s2)); //false!!

      That's super weird! The reason is that getPigSchema was setting two level access to true for bags. I added a test, and deleted the piece that set it. I worked with trunk, but a cursory glance makes it appear that it should be able to work with other versions as well, as I don't think that code has changed for a while. I ran test-commit without issue, but haven't ran the full test suite.

      I appreciate any feedback on this!

      Attachments

        1. PIG2379_1.patch
          3 kB
          Jonathan Coveney
        2. PIG2379_2.patch
          0.6 kB
          Daniel Dai
        3. PIG2379.patch
          39 kB
          Jonathan Coveney

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jcoveney Jonathan Coveney
            jcoveney Jonathan Coveney
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment