diff --git a/node/src/arrow.ts b/node/src/arrow.ts index 6aac34b9..457c3040 100644 --- a/node/src/arrow.ts +++ b/node/src/arrow.ts @@ -624,8 +624,6 @@ function validateSchemaEmbeddings( } if (missingEmbeddingFields.length > 0 && embeddings === undefined) { - console.log({ missingEmbeddingFields, embeddings }); - throw new Error( `Table has embeddings: "${missingEmbeddingFields .map((f) => f.name) @@ -633,5 +631,5 @@ function validateSchemaEmbeddings( ); } - return new Schema(fields); + return new Schema(fields, schema.metadata); } diff --git a/nodejs/lancedb/arrow.ts b/nodejs/lancedb/arrow.ts index 651e9871..a786124d 100644 --- a/nodejs/lancedb/arrow.ts +++ b/nodejs/lancedb/arrow.ts @@ -677,8 +677,6 @@ function validateSchemaEmbeddings( } if (missingEmbeddingFields.length > 0 && embeddings === undefined) { - console.log({ missingEmbeddingFields, embeddings }); - throw new Error( `Table has embeddings: "${missingEmbeddingFields .map((f) => f.name) @@ -686,5 +684,5 @@ function validateSchemaEmbeddings( ); } - return new Schema(fields); + return new Schema(fields, schema.metadata); }