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

This commit is contained in:
Lei Xu
2024-01-23 13:25:15 -08:00
committed by GitHub
parent b4d451ed21
commit ccfd043939
6 changed files with 595 additions and 169 deletions

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]
}