[
https://issues.apache.org/jira/browse/AVRO-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15243209#comment-15243209
]
SK Liew commented on AVRO-1830:
-------------------------------
The 'null' here refers to a valid codec. $data->{meta}{'avro.codec'} || undef
would set $codec to undef when $data->{meta}{'avro.codec'} is undef, which
would still fail the is_codec_valid test:
<code>
our %ValidCodec = (
null => 1,
deflate => 1,
);
sub is_codec_valid {
my $datafile = shift;
my $codec = shift || '';
return $ValidCodec{$codec};
}
</code>
> Avro-Perl DataFileReader chokes when avro.codec is absent
> ---------------------------------------------------------
>
> Key: AVRO-1830
> URL: https://issues.apache.org/jira/browse/AVRO-1830
> Project: Avro
> Issue Type: Bug
> Components: perl
> Affects Versions: 1.8.0
> Reporter: SK Liew
> Priority: Minor
> Attachments: Avro-1830.patch
>
>
> When a container does not specify its "avro.codec", it should be assumed to
> be "null". An exception is thrown when I try to read such a container using
> Avro::DataFileReader. The error happens at Avro/DataFileReader.pm line 101.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)