[ https://issues.apache.org/jira/browse/PIG-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089366#comment-13089366 ]
Vivek Padmanabhan commented on PIG-2217: ---------------------------------------- Sorry for my confusing comment. My point was, if I dont specify a schema definition along with my load statement, then PigStorageSchema wont save the schema files. This is happening from Pig 0.8 onwards, if I use Pig 0.7 I can see the files saved. I believe this is because the schema object is null in 0.8, but for 0.7 there is an empty schema created. Is this behaviour expected from 0.8 onwards. > POStore.getSchema() returns null if I dont have a schema defined at load > statement > ---------------------------------------------------------------------------------- > > Key: PIG-2217 > URL: https://issues.apache.org/jira/browse/PIG-2217 > Project: Pig > Issue Type: Bug > Affects Versions: 0.8.1, 0.9.0 > Reporter: Vivek Padmanabhan > > If I don't specify a schema definition in load statement, then > POStore.getSchema() returns null because of which PigOutputCommitter is not > storing schema . > For example if I run the below script, ".pig_header" and ".pig_schema" files > wont be saved. > load_1 = LOAD 'i1' USING PigStorage(); > ordered_data_1 = ORDER load_1 BY * ASC PARALLEL 1; > STORE ordered_data_1 INTO 'myout' using > org.apache.pig.piggybank.storage.PigStorageSchema(); > This works fine with Pig 0.7, but 0.8 onwards StoreMetadata.storeSchema is > not getting invoked for these cases. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira