-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
22 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,11 @@ | |
// SPDX-License-Identifier: MIT | ||
// Copyright (c) vis.gl contributors | ||
|
||
// Forked from https://github.com/kbajalc/parquets under MIT license (Copyright (c) 2017 ironSource Ltd.) | ||
// __VERSION__ is injected by babel-plugin-version-inline | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
export const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest'; | ||
export const PARQUET_WASM_URL = 'https://unpkg.com/[email protected]/esm/arrow1_bg.wasm'; | ||
|
||
/** | ||
* Parquet File Magic String | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,7 @@ import type {Loader, LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-u | |
import type {ArrowTable} from '@loaders.gl/arrow'; | ||
|
||
import {parseParquetWasm} from './lib/wasm/parse-parquet-wasm'; | ||
|
||
// __VERSION__ is injected by babel-plugin-version-inline | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest'; | ||
import {VERSION, PARQUET_WASM_URL} from './lib/constants'; | ||
|
||
/** Parquet WASM loader options */ | ||
export type ParquetWasmLoaderOptions = LoaderOptions & { | ||
|
@@ -34,7 +31,7 @@ export const ParquetWasmWorkerLoader: Loader<ArrowTable, never, ParquetWasmLoade | |
options: { | ||
parquet: { | ||
type: 'arrow-table', | ||
wasmUrl: 'https://unpkg.com/[email protected]/esm/arrow1_bg.wasm' | ||
wasmUrl: PARQUET_WASM_URL | ||
} | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,7 @@ import type {ArrowTable} from '@loaders.gl/arrow'; | |
import {encode} from './lib/wasm/encode-parquet-wasm'; | ||
import type {WriterOptions} from '@loaders.gl/loader-utils'; | ||
|
||
// __VERSION__ is injected by babel-plugin-version-inline | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest'; | ||
import {VERSION, PARQUET_WASM_URL} from './lib/constants'; | ||
|
||
export type ParquetWriterOptions = WriterOptions & { | ||
parquet?: { | ||
|
@@ -28,7 +26,7 @@ export const ParquetWasmWriter: WriterWithEncoder<ArrowTable, never, ParquetWrit | |
binary: true, | ||
options: { | ||
parquet: { | ||
wasmUrl: 'https://unpkg.com/[email protected]/esm2/arrow1_bg.wasm' | ||
wasmUrl: PARQUET_WASM_URL | ||
} | ||
}, | ||
encode(arrowTable: ArrowTable, options?: ParquetWriterOptions) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters