feat: change create table to accept Arrow table (#845)

This commit is contained in:
Lei Xu
2024-04-05 16:27:50 -07:00
committed by Weston Pace
parent 5ecbf971e2
commit 65c1d8bc4c
5 changed files with 586 additions and 160 deletions
+2 -1
View File
@@ -129,7 +129,8 @@ export class Query<T = number[]> {
const newObject: Record<string, unknown> = {}
Object.keys(entry).forEach((key: string) => {
if (entry[key] instanceof Vector) {
newObject[key] = (entry[key] as Vector).toArray()
// toJSON() returns f16 array correctly
newObject[key] = (entry[key] as Vector).toJSON()
} else {
newObject[key] = entry[key]
}