feat(nodejs): feature parity [6/N] - make public interface work with multiple arrow versions (#1392)

previously we didnt have great compatibility with other versions of
apache arrow. This should bridge that gap a bit.


depends on https://github.com/lancedb/lancedb/pull/1391
see actual diff here
https://github.com/universalmind303/lancedb/compare/query-filter...universalmind303:arrow-compatibility
This commit is contained in:
Cory Grinstead
2024-06-25 11:10:08 -05:00
committed by GitHub
parent a866b78a31
commit 79a1667753
8 changed files with 175 additions and 38 deletions

View File

@@ -39,7 +39,9 @@ describe.each([arrow, arrowOld])("Given a table", (arrow: any) => {
let tmpDir: tmp.DirResult;
let table: Table;
const schema = new arrow.Schema([
const schema:
| import("apache-arrow").Schema
| import("apache-arrow-old").Schema = new arrow.Schema([
new arrow.Field("id", new arrow.Float64(), true),
]);
@@ -315,7 +317,7 @@ describe("When creating an index", () => {
.query()
.limit(2)
.nearestTo(queryVec)
.distanceType("DoT")
.distanceType("dot")
.toArrow();
expect(rst.numRows).toBe(2);