Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated June 4, 2013, 9:50 p.m.) Review request for pig and Rohini Palaniswamy. Changes --- 1) Changed patch to use mock.Storage() 2) Smaller generated avro file Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs (updated) - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
On June 3, 2013, 1:20 p.m., Rohini Palaniswamy wrote: http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java, lines 629-636 https://reviews.apache.org/r/11355/diff/2/?file=295976#file295976line629 Isn't a load and store enough to reproduce the test case? Why such a long pig script? Please try to keep the unit tests simple. Made a smaller script to test it. - Viraj --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/#review21315 --- On June 4, 2013, 9:50 p.m., Viraj Bhat wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated June 4, 2013, 9:50 p.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
On June 2, 2013, 8:55 p.m., Cheolsoo Park wrote: Hi Viraj, I have a couple of comments: - 5k records seems unnecessary for a unit test case. You need just a few records to verify your fix, don't you? - In you test case, can't you use mock.Storage instead of PigStorage? Then, you won't need an extra input file (numbers.txt). Please see org.apache.pig.builtin.mock.Storage.java. - Can you put code changes and test files in a single patch and attach it in the jira? It would be very helpful if I could apply everything with a single patch command. Thank you! Hi Cheolsoo, Thanks for your comments fixed the test case and removed the PigStorage() and replaced it with mock.Storage. Viraj - Viraj --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/#review21304 --- On June 4, 2013, 9:50 p.m., Viraj Bhat wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated June 4, 2013, 9:50 p.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated June 4, 2013, 11:23 p.m.) Review request for pig and Rohini Palaniswamy. Changes --- Updated the patch based on PIG-3322 Viraj Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs (updated) - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1489655 Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/#review21455 --- Ship it! Ship It! - Rohini Palaniswamy On June 4, 2013, 11:23 p.m., Viraj Bhat wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated June 4, 2013, 11:23 p.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1489655 Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/#review21315 --- http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java https://reviews.apache.org/r/11355/#comment44213 Initialize defaultValue in a variable and pass defaultValue instead of doing a if else condition. http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java https://reviews.apache.org/r/11355/#comment44215 Isn't a load and store enough to reproduce the test case? Why such a long pig script? Please try to keep the unit tests simple. - Rohini Palaniswamy On May 30, 2013, 2:29 a.m., Viraj Bhat wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated May 30, 2013, 2:29 a.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/avro_test_files/numbers.txt PRE-CREATION Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/#review21304 --- Hi Viraj, I have a couple of comments: - 5k records seems unnecessary for a unit test case. You need just a few records to verify your fix, don't you? - In you test case, can't you use mock.Storage instead of PigStorage? Then, you won't need an extra input file (numbers.txt). Please see org.apache.pig.builtin.mock.Storage.java. - Can you put code changes and test files in a single patch and attach it in the jira? It would be very helpful if I could apply everything with a single patch command. Thank you! - Cheolsoo Park On May 30, 2013, 2:29 a.m., Viraj Bhat wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated May 30, 2013, 2:29 a.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/avro_test_files/numbers.txt PRE-CREATION Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat
Re: Review Request: PIG-3331 Default values not written to Schema when specified in the output schema
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11355/ --- (Updated May 30, 2013, 2:29 a.m.) Review request for pig and Rohini Palaniswamy. Description --- Patch to write default values to the Schema when the writer schema contains that in the AvroStorage. Diffs - http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigSchema2Avro.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/TestAvroStorage.java 1485826 http://svn.apache.org/repos/asf/pig/trunk/contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/avro/avro_test_files/numbers.txt PRE-CREATION Diff: https://reviews.apache.org/r/11355/diff/ Testing --- Yes against the Piggybank in Pig trunk/Pig 0.12 Thanks, Viraj Bhat