MCPcopy Create free account
hub / github.com/apache/arrow-rs / append

Method append

arrow-flight/src/sql/metadata/tables.rs:135–157  ·  view source on GitHub ↗

Append a row

(
        &mut self,
        catalog_name: impl AsRef<str>,
        schema_name: impl AsRef<str>,
        table_name: impl AsRef<str>,
        table_type: impl AsRef<str>,
        table_schema: &Schem

Source from the content-addressed store, hash-verified

133
134 /// Append a row
135 pub fn append(
136 &mut self,
137 catalog_name: impl AsRef<str>,
138 schema_name: impl AsRef<str>,
139 table_name: impl AsRef<str>,
140 table_type: impl AsRef<str>,
141 table_schema: &Schema,
142 ) -> Result<()> {
143 self.catalog_name.append_value(catalog_name);
144 self.db_schema_name.append_value(schema_name);
145 self.table_name.append_value(table_name);
146 self.table_type.append_value(table_type);
147 if let Some(self_table_schema) = self.table_schema.as_mut() {
148 let options = IpcWriteOptions::default();
149 // encode the schema into the correct form
150 let message: std::result::Result<IpcMessage, _> =
151 SchemaAsIpc::new(table_schema, &options).try_into();
152 let IpcMessage(schema) = message?;
153 self_table_schema.append_value(schema);
154 }
155
156 Ok(())
157 }
158
159 /// builds a `RecordBatch` for `CommandGetTables`
160 pub fn build(self) -> Result<RecordBatch> {

Callers 15

list_actionsMethod · 0.45
get_ref_builderFunction · 0.45
test_tables_are_sortedFunction · 0.45
execute_flightFunction · 0.45
do_get_catalogsMethod · 0.45
do_get_schemasMethod · 0.45
do_get_tablesMethod · 0.45

Calls 2

defaultFunction · 0.85
append_valueMethod · 0.45

Tested by 10

test_tables_are_sortedFunction · 0.36
do_get_catalogsMethod · 0.36
do_get_schemasMethod · 0.36
do_get_tablesMethod · 0.36
do_get_table_typesMethod · 0.36