feat: support different types for CompatReader (#3745)

* feat: support different types for `CompatReader`

* chore: only compare whether we need: (data_type)

* fix: optimize code based on review suggestions

- add unit test `test_safe_cast_to_null` to test safely cast
- add DataType to projected_fields
- remove TODO

* fix: assert_eq fail on `projection.rs`

* style: codefmt

* style: fix the code based on review suggestions
This commit is contained in:
Kould
2024-04-24 14:27:52 +08:00
committed by GitHub
parent 20a933e395
commit 42e7403fcc
5 changed files with 235 additions and 85 deletions

View File

@@ -107,6 +107,10 @@ impl ColumnMetadata {
pub fn decode_list(bytes: &[u8]) -> serde_json::Result<Vec<Self>> {
serde_json::from_slice(bytes)
}
pub fn is_same_datatype(&self, other: &Self) -> bool {
self.column_schema.data_type == other.column_schema.data_type
}
}
#[cfg_attr(doc, aquamarine::aquamarine)]