Create a new schema with the same keys/options/comment but different row type
(&self, row_type: RowType)
| 572 | |
| 573 | /// Create a new schema with the same keys/options/comment but different row type |
| 574 | pub fn copy(&self, row_type: RowType) -> crate::Result<Self> { |
| 575 | Self::new( |
| 576 | row_type.fields().to_vec(), |
| 577 | self.partition_keys.clone(), |
| 578 | self.primary_keys.clone(), |
| 579 | self.options.clone(), |
| 580 | self.comment.clone(), |
| 581 | ) |
| 582 | } |
| 583 | |
| 584 | /// Create a new builder for configuring a schema. |
| 585 | pub fn builder() -> SchemaBuilder { |