You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Which issue does this PR close?
- Previously, we used `record_batch.with_schema(target_schema.clone())`
to change the schema name of a record batch, but unfortunately,
`with_schema` would check the schema name and throw an error. So I think
we should convert the RecordBatch like how `BatchTransform::Modify`
does, but keep the same columns.
```rust
pub fn with_schema(self, schema: SchemaRef) -> Result<Self, ArrowError> {
if !schema.contains(self.schema.as_ref()) {
return Err(ArrowError::SchemaError(format!(
"target schema is not superset of current schema target={schema} current={}",
self.schema
)));
}
Ok(Self {
schema,
columns: self.columns,
row_count: self.row_count,
})
}
```
- Closes #.
## What changes are included in this PR?
## Are these changes tested?
0 commit comments