This is expected. Kite does schema evolution by field compatibility,
not record equality. The full details are in our schema evolution
guide[1]. I'd also expect the same to work if you wrote data using
MyClass.getClassSchema() and then read it with Avro using
MyDifferentClass.getClassSchema(), Avro would handle it the same way.
-Joey
On Mon, Mar 23, 2015 at 2:47 PM, Allan Shoup <
allan...@gmail.com> wrote:
> Joey, here's what my test looked like:
>
> DatasetDescriptor descriptor = new
> DatasetDescriptor.Builder().schema(MyClass.getClassSchema()).build();
> Dataset<MyClass> dataset1 = Datasets.create(uri, descriptor,
> MyClass.class);
>
> DatasetDescriptor existingDescriptor = Datasets.load(uri,
> MyDifferentClass.class).getDataset().getDescriptor();
> descriptor = new
> DatasetDescriptor.Builder(existingDescriptor).schema(MyDifferentClass.getClassSchema()).build();
> // I expected this to fail because Avro considers MyClass ->
> MyDifferentClass an incompatible change
> Dataset<MyDifferentClass> dataset2 = Datasets.update(uri,
> descriptor, MyDifferentClass.class);