Skip to content

Commit

Permalink
Merge branch 'main' into feat/parallel-indexed-dbm
Browse files Browse the repository at this point in the history
  • Loading branch information
vpbs2 committed Sep 4, 2024
2 parents 3e491b3 + bb824e5 commit 0927c27
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 28 deletions.
2 changes: 1 addition & 1 deletion benchmarking/public/runner/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions benchmarking/src/app/dbm-context/instance-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as duckdb from '@devrev/duckdb-wasm';
import { AsyncDuckDB, LogEntryVariant } from '@devrev/duckdb-wasm';
import { InstanceManagerType } from '@devrev/meerkat-dbm';
import * as duckdb from '@duckdb/duckdb-wasm';
import { AsyncDuckDB, LogEntryVariant } from '@duckdb/duckdb-wasm';
const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();

export class InstanceManager implements InstanceManagerType {
Expand Down
4 changes: 2 additions & 2 deletions benchmarking/src/app/dbm-context/use-async-duckdb.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as duckdb from '@devrev/duckdb-wasm';
import { AsyncDuckDB } from '@devrev/duckdb-wasm';
import { DBM, FileManagerType } from '@devrev/meerkat-dbm';
import * as duckdb from '@duckdb/duckdb-wasm';
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
import React, { useState } from 'react';
import { useClassicEffect } from '../hooks/use-classic-effect';
const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();
Expand Down
2 changes: 1 addition & 1 deletion meerkat-browser-runner/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import log from 'loglevel';
import { TableWiseFiles } from 'meerkat-dbm/src/types';
import { useEffect, useRef, useState } from 'react';
import { InstanceManager } from './instance-manager';
import { InstanceManager } from './duck-db/instance-manager';

type EffectCallback = () => void | (() => void | undefined);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as duckdb from '@devrev/duckdb-wasm';
import { AsyncDuckDB, LogEntryVariant } from '@devrev/duckdb-wasm';
import { InstanceManagerType } from '@devrev/meerkat-dbm';
import * as duckdb from '@duckdb/duckdb-wasm';
import { AsyncDuckDB, LogEntryVariant } from '@duckdb/duckdb-wasm';
const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();

export class InstanceManager implements InstanceManagerType {
private db: AsyncDuckDB | null = null;

private async initDB() {
const bundle = await duckdb.selectBundle(JSDELIVR_BUNDLES);

Expand Down
2 changes: 1 addition & 1 deletion meerkat-dbm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.1",
"dependencies": {
"tslib": "^2.3.0",
"@duckdb/duckdb-wasm": "^1.28.0",
"@devrev/duckdb-wasm": "1.14.3",
"dexie": "^3.2.4",
"loglevel": "^1.8.1",
"uuid": "^9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion meerkat-dbm/src/dbm/__test__/mock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
import { AsyncDuckDB } from '@devrev/duckdb-wasm';
import { InstanceManagerType } from '../instance-manager';

export const mockDB = {
Expand Down
2 changes: 1 addition & 1 deletion meerkat-dbm/src/dbm/dbm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncDuckDBConnection } from '@duckdb/duckdb-wasm';
import { AsyncDuckDBConnection } from '@devrev/duckdb-wasm';
import { Table } from 'apache-arrow/table';
import { v4 as uuidv4 } from 'uuid';
import { FileManagerType } from '../file-manager/file-manager-type';
Expand Down
2 changes: 1 addition & 1 deletion meerkat-dbm/src/dbm/instance-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
import { AsyncDuckDB } from '@devrev/duckdb-wasm';

export interface InstanceManagerType {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
import { AsyncDuckDB } from '@devrev/duckdb-wasm';
import 'fake-indexeddb/auto';
import { InstanceManagerType } from '../../dbm/instance-manager';
import { FILE_TYPES } from '../../types';
Expand All @@ -15,9 +15,9 @@ const mockDB = {
return {
query: jest.fn(),
insertJSONFromPath: jest.fn(),
close: jest.fn()
close: jest.fn(),
};
}
},
};

describe('IndexedDBFileManager', () => {
Expand Down Expand Up @@ -194,9 +194,9 @@ describe('IndexedDBFileManager', () => {
files: [
{
fileName: 'taxi2.parquet',
fileType: 'parquet'
}
]
fileType: 'parquet',
},
],
});

expect(
Expand All @@ -212,7 +212,7 @@ describe('IndexedDBFileManager', () => {
// Verify that the file is dropped
expect(tableData2[0]).toEqual({
tableName: 'taxi1',
files: []
files: [],
});

expect(
Expand All @@ -233,8 +233,8 @@ describe('IndexedDBFileManager', () => {
tableName: 'taxi-json',
fileName: 'taxi-json.parquet',
json: {
test: 'test'
}
test: 'test',
},
};

await fileManager.registerJSON(jsonFile);
Expand All @@ -257,16 +257,16 @@ describe('IndexedDBFileManager', () => {
tableName: 'taxi-json-bulk',
fileName: 'taxi-json1.parquet',
json: {
test: 'test'
}
test: 'test',
},
},
{
tableName: 'taxi-json-bulk',
fileName: 'taxi-json2.parquet',
json: {
test: 'test'
}
}
test: 'test',
},
},
];

await fileManager.bulkRegisterJSON(jsonFiles);
Expand Down
2 changes: 1 addition & 1 deletion meerkat-dbm/src/file-manager/file-registerer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
import { AsyncDuckDB } from '@devrev/duckdb-wasm';
import { InstanceManagerType } from '../dbm/instance-manager';

interface FileRegistererConstructorOptions {
Expand Down
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {},
"private": true,
"dependencies": {
"@devrev/duckdb-wasm": "1.14.3",
"@duckdb/duckdb-wasm": "^1.28.0",
"@nx/next": "16.8.1",
"@swc/helpers": "~0.5.0",
Expand Down

0 comments on commit 0927c27

Please sign in to comment.