mirror of
https://github.com/asadbek064/hyparquet.git
synced 2025-12-29 08:26:39 +00:00
demo: pass metadata to worker
This commit is contained in:
parent
603bb7ad83
commit
da37b512d0
@ -101,7 +101,7 @@ function parquetDataFrame(from: AsyncBufferFrom, metadata: FileMetaData): DataFr
|
||||
*/
|
||||
rows(rowStart, rowEnd, orderBy) {
|
||||
console.log(`reading rows ${rowStart}-${rowEnd}`, orderBy)
|
||||
return parquetQueryWorker({ asyncBuffer: from, rowStart, rowEnd, orderBy })
|
||||
return parquetQueryWorker({ asyncBuffer: from, metadata, rowStart, rowEnd, orderBy })
|
||||
},
|
||||
sortable: true,
|
||||
}
|
||||
|
||||
2
demo/bundle.min.js
vendored
2
demo/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -60,7 +60,7 @@ export async function asyncBufferFrom(from: AsyncBufferFrom): Promise<AsyncBuffe
|
||||
const key = JSON.stringify(from)
|
||||
const cached = cache.get(key)
|
||||
if (cached) return cached
|
||||
const asyncBuffer = 'url' in from ? asyncBufferFromUrl(from.url) : from.file.arrayBuffer()
|
||||
const asyncBuffer = 'url' in from ? asyncBufferFromUrl(from.url, from.byteLength) : from.file.arrayBuffer()
|
||||
cache.set(key, asyncBuffer.then(cachedAsyncBuffer))
|
||||
return asyncBuffer
|
||||
}
|
||||
|
||||
2
demo/workers/worker.min.js
vendored
2
demo/workers/worker.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user