Aleksandr Beylin created AVRO-3259:
--------------------------------------
Summary: When opening an avro file which is encoded with anything
besides none and deflate, it defaults to none and then returns garbage.
Key: AVRO-3259
URL: https://issues.apache.org/jira/browse/AVRO-3259
Project: Apache Avro
Issue Type: Bug
Components: csharp
Affects Versions: 1.10.2
Reporter: Aleksandr Beylin
In the file
[https://github.com/apache/avro/blob/master/lang/csharp/src/apache/main/File/Codec.cs,]
the code is in two places which returns appropriate codec:
{code:java}
public static Codec CreateCodec(Type codecType)
{
switch (codecType)
{
case Type.Deflate:
return new DeflateCodec();
default:
return new NullCodec();
}
}{code}
and
{code:java}
public static Codec CreateCodecFromString(string codecType)
{
switch (codecType)
{
case DataFileConstants.DeflateCodec:
return new DeflateCodec();
default:
return new NullCodec();
}
} {code}
Instead, if the codecType isn't null or Deflate, it should throw
NotImplementedException.
I've had cases where a file encoded with snappy would first return garbage, and
then entirely kill the process.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)