Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: grunt
    • Labels:
      None

      Description

      currently 'describe' dumps the schema in one line. If you have a long or complicated schema, it is pretty much impossible to figure out how the schema looks or what the fileds are.

      will provide an example below.

      1. PIG-2697-fix-0.patch
        0.7 kB
        Jonathan Coveney
      2. PIG-2697.patch
        5 kB
        Raghu Angadi
      3. PIG-2697.patch
        5 kB
        Raghu Angadi

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        46d 40m 1 Jonathan Coveney 27/Jun/12 00:33
        Resolved Resolved Closed Closed
        240d 5h 19m 1 Bill Graham 22/Feb/13 04:53
        Bill Graham made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Jonathan Coveney added a comment -

        Fix is in. Thanks Julien.

        Show
        Jonathan Coveney added a comment - Fix is in. Thanks Julien.
        Hide
        Julien Le Dem added a comment -

        +1

        Show
        Julien Le Dem added a comment - +1
        Jonathan Coveney made changes -
        Attachment PIG-2697-fix-0.patch [ 12533741 ]
        Hide
        Jonathan Coveney added a comment -

        Good call Julien. Not sure how this happened as I ran the tests, but shrug. This fixes it.

        Show
        Jonathan Coveney added a comment - Good call Julien. Not sure how this happened as I ran the tests, but shrug . This fixes it.
        Hide
        Jonathan Coveney added a comment -

        Julien,

        I was not able to reproduce this. Can you try to give me specifics on how to reproduce?

        Show
        Jonathan Coveney added a comment - Julien, I was not able to reproduce this. Can you try to give me specifics on how to reproduce?
        Hide
        Julien Le Dem added a comment -

        it seems org.apache.pig.pigunit.PigTest does not compile anymore.

            [javac] /Users/julien/svn/pig/trunk-PIG-2748/test/org/apache/pig/pigunit/PigTest.java:254: stringifySchema(java.lang.StringBuilder,org.apache.pig.impl.logicalLayer.schema.Schema,byte,int) in org.apache.pig.impl.logicalLayer.schema.Schema cannot be applied to (java.lang.StringBuilder,org.apache.pig.impl.logicalLayer.schema.Schema,byte)
            [javac]     Schema.stringifySchema(sb, pig.dumpSchema(aliasInput), DataType.TUPLE) ;
        
        Show
        Julien Le Dem added a comment - it seems org.apache.pig.pigunit.PigTest does not compile anymore. [javac] /Users/julien/svn/pig/trunk-PIG-2748/test/org/apache/pig/pigunit/PigTest.java:254: stringifySchema(java.lang.StringBuilder,org.apache.pig.impl.logicalLayer.schema.Schema,byte,int) in org.apache.pig.impl.logicalLayer.schema.Schema cannot be applied to (java.lang.StringBuilder,org.apache.pig.impl.logicalLayer.schema.Schema,byte) [javac] Schema.stringifySchema(sb, pig.dumpSchema(aliasInput), DataType.TUPLE) ;
        Jonathan Coveney made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Jonathan Coveney added a comment -

        It's in!

        Show
        Jonathan Coveney added a comment - It's in!
        Hide
        Jonathan Coveney added a comment -

        +1. Assuming it passes ant test-commit (#berigorousgetitright ), I'll commit.

        Show
        Jonathan Coveney added a comment - +1. Assuming it passes ant test-commit (#berigorousgetitright ), I'll commit.
        Raghu Angadi made changes -
        Fix Version/s 0.11 [ 12318878 ]
        Raghu Angadi made changes -
        Attachment PIG-2697.patch [ 12533533 ]
        Hide
        Raghu Angadi added a comment -

        saw Dmitriy's comment late.
        Added this property to pig.properties in the updated patch. Also made the string 'static final'.

        Show
        Raghu Angadi added a comment - saw Dmitriy's comment late. Added this property to pig.properties in the updated patch. Also made the string 'static final'.
        Hide
        Dmitriy V. Ryaboy added a comment -

        Raghu,
        This looks good, but please add the new property to the pig.properties file that ships with pig, together with comments about what it does.
        Also, that string should probably be static final instead of just inlined..

        Show
        Dmitriy V. Ryaboy added a comment - Raghu, This looks good, but please add the new property to the pig.properties file that ships with pig, together with comments about what it does. Also, that string should probably be static final instead of just inlined..
        Hide
        Russell Jurney added a comment -

        It wants they. It wants they in 0.11. Can plz to have in 0.11?

        Show
        Russell Jurney added a comment - It wants they. It wants they in 0.11. Can plz to have in 0.11?
        Raghu Angadi made changes -
        Field Original Value New Value
        Attachment PIG-2697.patch [ 12526584 ]
        Hide
        Raghu Angadi added a comment -

        schema for one of the structs used in Thrft unit tests :

        grunt> a = load 'x' using com.twitter.elephantbird.pig.load.ThriftPigLoader('thrift.test.Nesting');
        grunt> describe a;
        grunt> a: {my_bonk: (type: int,message: chararray),my_ooe: (im_true: int,im_false: int,a_bite: int,integer16: int,integer32: int,integer64: long,double_precision: double,some_characters: chararray,zomg_unicode: chararray,what_who: int,base64: bytearray,byte_list: {t: (byte_list_tuple: int)},i16_list: {t: (i16_list_tuple: int)},i64_list: {t: (i64_list_tuple: long)})}
        

        after:

        grunt> set pig.pretty.print.schema true;
        grunt> describe a;
        a: {
            my_bonk: (
                type: int,
                message: chararray
            ),
            my_ooe: (
                im_true: int,
                im_false: int,
                a_bite: int,
                integer16: int,
                integer32: int,
                integer64: long,
                double_precision: double,
                some_characters: chararray,
                zomg_unicode: chararray,
                what_who: int,
                base64: bytearray,
                byte_list: {
                    t: (
                        byte_list_tuple: int
                    )
                },
                i16_list: {
                    t: (
                        i16_list_tuple: int
                    )
                },
                i64_list: {
                    t: (
                        i64_list_tuple: long
                    )
                }
            )
        }
        
        Show
        Raghu Angadi added a comment - schema for one of the structs used in Thrft unit tests : grunt> a = load 'x' using com.twitter.elephantbird.pig.load.ThriftPigLoader('thrift.test.Nesting'); grunt> describe a; grunt> a: {my_bonk: (type: int ,message: chararray),my_ooe: (im_true: int ,im_false: int ,a_bite: int ,integer16: int ,integer32: int ,integer64: long ,double_precision: double ,some_characters: chararray,zomg_unicode: chararray,what_who: int ,base64: bytearray,byte_list: {t: (byte_list_tuple: int )},i16_list: {t: (i16_list_tuple: int )},i64_list: {t: (i64_list_tuple: long )})} after: grunt> set pig.pretty.print.schema true ; grunt> describe a; a: { my_bonk: ( type: int , message: chararray ), my_ooe: ( im_true: int , im_false: int , a_bite: int , integer16: int , integer32: int , integer64: long , double_precision: double , some_characters: chararray, zomg_unicode: chararray, what_who: int , base64: bytearray, byte_list: { t: ( byte_list_tuple: int ) }, i16_list: { t: ( i16_list_tuple: int ) }, i64_list: { t: ( i64_list_tuple: long ) } ) }
        Raghu Angadi created issue -

          People

          • Assignee:
            Raghu Angadi
            Reporter:
            Raghu Angadi
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development