-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async reader #96
Async reader #96
Conversation
future created by async block is not `Send`
Tons of progress:
Future work:
|
It looks like this isn't generally possible without consuming Given this, a class-based solution will only work if the entire class can be cloned. At that point, I think it'll be simpler to have a functional API instead: pub async fn read_row_group(
url: String,
content_length: usize,
metadata: FileMetaData,
i: usize,
) -> Result<Uint8Array, JsValue> The inputs can be copied on the JS side. So to create an async iterator, you'd do const metadata = await read_parquet_metadata(url);
const batches = [];
for (let i of metadata.numRowGroups) {
const batch = await read_row_group(metadata, i);
batches.push(batch);
} |
Working async reader just for the
arrow2
bindings.TODO:
read_row_group
take aRowGroupMetaData
instead of aFileMetaData
?wasm-bindgen
for the async functions to take references as function parameters, sincewasm-bindgen
doesn't support lifetimesVery early, just putting this up for planning.
Todo:
References:
Future work: