(
file_io: FileIO,
schema_manager: SchemaManager,
table_schema_id: i64,
table_fields: Vec<DataField>,
read_type: Vec<DataField>,
blob_as_descriptor: boo
| 77 | |
| 78 | impl DataEvolutionReader { |
| 79 | pub(crate) fn new( |
| 80 | file_io: FileIO, |
| 81 | schema_manager: SchemaManager, |
| 82 | table_schema_id: i64, |
| 83 | table_fields: Vec<DataField>, |
| 84 | read_type: Vec<DataField>, |
| 85 | blob_as_descriptor: bool, |
| 86 | blob_descriptor_fields: HashSet<String>, |
| 87 | ) -> crate::Result<Self> { |
| 88 | let row_id_index = read_type.iter().position(|f| f.name() == ROW_ID_FIELD_NAME); |
| 89 | let file_read_type: Vec<DataField> = read_type |
| 90 | .iter() |
| 91 | .filter(|f| f.name() != ROW_ID_FIELD_NAME) |
| 92 | .cloned() |
| 93 | .collect(); |
| 94 | let output_schema = build_target_arrow_schema(&read_type)?; |
| 95 | |
| 96 | Ok(Self { |
| 97 | file_io, |
| 98 | schema_manager, |
| 99 | table_schema_id, |
| 100 | table_fields, |
| 101 | file_read_type, |
| 102 | row_id_index, |
| 103 | output_schema, |
| 104 | blob_as_descriptor, |
| 105 | blob_descriptor_fields, |
| 106 | }) |
| 107 | } |
| 108 | |
| 109 | /// Read data files in data evolution mode. |
| 110 | pub fn read(self, data_splits: &[DataSplit]) -> crate::Result<ArrowRecordBatchStream> { |
nothing calls this directly
no test coverage detected