MCPcopy Create free account
hub / github.com/apache/paimon-rust / new

Method new

crates/paimon/src/table/data_evolution_reader.rs:79–107  ·  view source on GitHub ↗
(
        file_io: FileIO,
        schema_manager: SchemaManager,
        table_schema_id: i64,
        table_fields: Vec<DataField>,
        read_type: Vec<DataField>,
        blob_as_descriptor: boo

Source from the content-addressed store, hash-verified

77
78impl 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> {

Callers

nothing calls this directly

Calls 8

normalize_merge_groupFunction · 0.85
is_blob_file_nameFunction · 0.85
to_vecMethod · 0.80
positionMethod · 0.45
iterMethod · 0.45
nameMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected