Permalink
Browse files

Just comments

  • Loading branch information...
1 parent 1547d00 commit 0971de51ae49f0535237d3f1dfcbc27472e3e2e0 @yannk committed Jun 8, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Avro/BinaryDecoder.pm
@@ -315,6 +315,9 @@ sub decode_union {
my $idx = decode_long($class, @_);
my $union_schema = $writer_schema->schemas->[$idx];
## XXX TODO: schema resolution
+ # The first schema in the reader's union that matches the selected writer's
+ # union schema is recursively resolved against it. if none match, an error
+ # is signalled.
return $class->decode(
reader_schema => $union_schema,
writer_schema => $union_schema,
@@ -333,7 +336,6 @@ sub skip_fixed {
sub decode_fixed {
my $class = shift;
my ($writer_schema, $reader_schema, $reader) = @_;
- ## TODO: what if schemas don't match
$reader->read(my $buf, $writer_schema->size);
return $buf;
}

0 comments on commit 0971de5

Please sign in to comment.