Describe the bug
The following code in Sort skips the field level metadata when when it constructs the output batch.
let schema = Arc::new(Schema::new(
schema
.fields()
.iter()
.zip(batch.columns().iter().map(|col| col.data_type()))
.map(|(field, ty)| Field::new(field.name(), ty.clone(), field.is_nullable()))
.collect::<Vec<_>>(),
));
It also seems to be unecessary (at least all the existing tests pass without it, so maybe @maxburke can comment on its), and so if any schema adjustment is needed it should have been done as part of the creation of Sort.
To Reproduce
Will add reproducer on ticket
Expected behavior
Metadata is preserverd
Additional context
Introduced in #1455
Describe the bug
The following code in Sort skips the field level metadata when when it constructs the output batch.
It also seems to be unecessary (at least all the existing tests pass without it, so maybe @maxburke can comment on its), and so if any schema adjustment is needed it should have been done as part of the creation of Sort.
To Reproduce
Will add reproducer on ticket
Expected behavior
Metadata is preserverd
Additional context
Introduced in #1455