@loaders.gl/schema 3.1.0-beta.1 → 3.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +211 -15081
- package/dist/category/common.d.ts +2 -1
- package/dist/category/common.d.ts.map +1 -1
- package/dist/category/mesh/convert-mesh.js +5 -6
- package/dist/category/mesh/mesh-to-arrow-table.d.ts +0 -10
- package/dist/category/mesh/mesh-to-arrow-table.d.ts.map +1 -1
- package/dist/category/mesh/mesh-to-arrow-table.js +36 -26
- package/dist/category/table/table-types.d.ts +3 -1
- package/dist/category/table/table-types.d.ts.map +1 -1
- package/dist/es5/category/mesh/convert-mesh.js +0 -8
- package/dist/es5/category/mesh/convert-mesh.js.map +1 -1
- package/dist/es5/category/mesh/mesh-to-arrow-table.js +0 -39
- package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +1 -1
- package/dist/es5/lib/arrow/arrow-type-utils.js +0 -70
- package/dist/es5/lib/arrow/arrow-type-utils.js.map +1 -1
- package/dist/esm/category/mesh/convert-mesh.js +0 -7
- package/dist/esm/category/mesh/convert-mesh.js.map +1 -1
- package/dist/esm/category/mesh/mesh-to-arrow-table.js +0 -29
- package/dist/esm/category/mesh/mesh-to-arrow-table.js.map +1 -1
- package/dist/esm/lib/arrow/arrow-type-utils.js +0 -60
- package/dist/esm/lib/arrow/arrow-type-utils.js.map +1 -1
- package/dist/lib/arrow/arrow-type-utils.d.ts +0 -5
- package/dist/lib/arrow/arrow-type-utils.d.ts.map +1 -1
- package/dist/lib/arrow/arrow-type-utils.js +67 -47
- package/package.json +3 -4
- package/src/category/common.ts +2 -1
- package/src/category/mesh/convert-mesh.ts +6 -6
- package/src/category/mesh/mesh-to-arrow-table.ts +4 -2
- package/src/category/table/table-types.ts +4 -1
- package/src/lib/arrow/arrow-type-utils.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/schema",
|
|
3
|
-
"version": "3.1.0-beta.
|
|
3
|
+
"version": "3.1.0-beta.2",
|
|
4
4
|
"description": "Table format APIs for JSON, CSV, etc...",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@types/geojson": "^7946.0.7"
|
|
36
|
-
"apache-arrow": "^4.0.0"
|
|
35
|
+
"@types/geojson": "^7946.0.7"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "90f487e7b3f15c554d57c92497d3a12d71676818"
|
|
39
38
|
}
|
package/src/category/common.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {Mesh} from './mesh-types';
|
|
2
2
|
import type {ColumnarTable, ArrowTable} from '../table/table-types';
|
|
3
|
-
import {convertMeshToArrowTable} from './mesh-to-arrow-table';
|
|
3
|
+
// import {convertMeshToArrowTable} from './mesh-to-arrow-table';
|
|
4
4
|
|
|
5
5
|
type TargetShape = 'mesh' | 'columnar-table' | 'arrow-table';
|
|
6
6
|
|
|
@@ -17,11 +17,11 @@ export function convertMesh(
|
|
|
17
17
|
return mesh;
|
|
18
18
|
case 'columnar-table':
|
|
19
19
|
return convertMeshToColumnarTable(mesh);
|
|
20
|
-
case 'arrow-table':
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// case 'arrow-table':
|
|
21
|
+
// return {
|
|
22
|
+
// shape: 'arrow-table',
|
|
23
|
+
// data: convertMeshToArrowTable(mesh)
|
|
24
|
+
// };
|
|
25
25
|
default:
|
|
26
26
|
throw new Error(`Unsupported shape ${options?.shape}`);
|
|
27
27
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*
|
|
1
2
|
import {
|
|
2
3
|
Table,
|
|
3
4
|
Schema,
|
|
@@ -6,7 +7,7 @@ import {
|
|
|
6
7
|
Field,
|
|
7
8
|
Data,
|
|
8
9
|
FixedSizeListVector
|
|
9
|
-
} from 'apache-arrow
|
|
10
|
+
} from 'apache-arrow';
|
|
10
11
|
import {AbstractVector} from 'apache-arrow/vector';
|
|
11
12
|
import {getArrowType, getArrowVector} from '../../lib/arrow/arrow-type-utils';
|
|
12
13
|
import type {Mesh} from './mesh-types';
|
|
@@ -18,7 +19,7 @@ import {makeMeshAttributeMetadata} from './deduce-mesh-schema';
|
|
|
18
19
|
* @param metadata
|
|
19
20
|
* @param batchSize
|
|
20
21
|
* @returns
|
|
21
|
-
|
|
22
|
+
*
|
|
22
23
|
export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
|
|
23
24
|
const vectors: AbstractVector[] = [];
|
|
24
25
|
const fields: Field[] = [];
|
|
@@ -39,3 +40,4 @@ export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
|
|
|
39
40
|
const table = new Table(schema, recordBatch);
|
|
40
41
|
return table;
|
|
41
42
|
}
|
|
43
|
+
*/
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type {Schema} from '../../lib/schema/schema';
|
|
2
|
-
import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow/Arrow.dom';
|
|
3
2
|
import type {AnyArray} from '../../types';
|
|
4
3
|
import type {Batch} from '../common';
|
|
4
|
+
// TODO Arrow dependency causes issues
|
|
5
|
+
// import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow/Arrow.dom';
|
|
6
|
+
type ApacheArrowTable = any;
|
|
7
|
+
type RecordBatch = any;
|
|
5
8
|
|
|
6
9
|
/** A general table */
|
|
7
10
|
export interface Table {
|