Last active
July 8, 2024 20:06
-
-
Save a-agmon/d66931cef847a975e589418caf2bb546 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let lance_table = connection.open_table("table_name").execute().await?; | |
let batches = vec![Ok(RecordBatch::try_new( | |
schema.clone(), | |
vec![Arc::new(key_array), Arc::new(vectors_array)], | |
)?) | |
.map_err(|e| ArrowError::from_external_error(e.into()))]; | |
let batch_iterator = RecordBatchIterator::new(batches, schema); | |
let boxed_batches = Box::new(batch_iterator); | |
lance_table.add(boxed_batches).execute().await?; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment