Details
Description
A pig script like the below succeeds, but inspecting the resulting file I find that the schema is stripped of the default value specification.
a = load ':INPATH:/types/numbers.txt' using PigStorage(':') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double); b2 = foreach a generate id, intnum5, intnum100; c2 = filter b2 by 110 <= id and id < 120; describe c2; dump c2; store c2 into ':OUTPATH:.intermediate_2' USING org.apache.pig.piggybank.storage.avro.AvroStorage(' { "debug" : 5, "schema" : { "name" : "schema_2", "type" : "record", "fields" : [ { "name" : "id", "type" : [ "null", "int" ] }, { "name" : "intnum5", "type" : [ "null", "int" ] }, { "name" : "intnum100", "type" : [ "null", "int" ], "default" : 0 } ] } } ');
BTW, the documentation on https://cwiki.apache.org/PIG/avrostorage.html is mute on the subject of defaults, so first question is: is my expectation that the default is to be written to file not correct?