> On Oct. 9, 2012, 1:06 a.m., Jakob Homan wrote: > > /trunk/serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java, > > line 97 > > <https://reviews.apache.org/r/7431/diff/3/?file=174393#file174393line97> > > > > Good optimization on the null check. Any reason not to put it as the > > first check in the method and potentially save the trip to the AvroSerde > > methods?
As an aside, it wasn't an optimization. Since we obscure nullable fields, the null case gets handled by the same path as actual values. Without the check, the tests that make sure nullable records work explode with NPEs. - Sean ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7431/#review12257 ----------------------------------------------------------- On Oct. 16, 2012, 1:08 p.m., Sean Busbey wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7431/ > ----------------------------------------------------------- > > (Updated Oct. 16, 2012, 1:08 p.m.) > > > Review request for hive. > > > Description > ------- > > Changes AvroSerDe to properly give the non-null schema to serialization > routines when using Nullable complex types > > > Diffs > ----- > > > /trunk/serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java > 1398763 > > /trunk/serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerializer.java > 1398763 > > Diff: https://reviews.apache.org/r/7431/diff/ > > > Testing > ------- > > Adds tests that check each of the Avro types that Serialization needs to use > a user-provided schema, both as top level fields and as nested members of a > complex type. > > > Thanks, > > Sean Busbey > >
