|
1 | 1 | // SPDX-License-Identifier: MIT |
2 | 2 | // Copyright contributors to the kepler.gl project |
3 | 3 |
|
| 4 | +import { ALL_FIELD_TYPES } from '@kepler.gl/constants'; |
| 5 | +import { ProtoDatasetField } from '@kepler.gl/types'; |
4 | 6 | import * as arrow from 'apache-arrow'; |
5 | | -import {console as globalConsole} from 'global/window'; |
6 | | -import {DATA_TYPES as AnalyzerDATA_TYPES} from 'type-analyzer'; |
7 | | -import {ProtoDatasetField} from '@kepler.gl/types'; |
8 | | -import {ALL_FIELD_TYPES} from '@kepler.gl/constants'; |
| 7 | +import { console as globalConsole } from 'global/window'; |
| 8 | +import { DATA_TYPES as AnalyzerDATA_TYPES } from 'type-analyzer'; |
9 | 9 |
|
10 | | -import {DataRow, SharedRowOptions} from './data-row'; |
11 | | -import {DataContainerInterface, RangeOptions} from './data-container-interface'; |
| 10 | +import { DataContainerInterface, RangeOptions } from './data-container-interface'; |
| 11 | +import { DataRow, SharedRowOptions } from './data-row'; |
12 | 12 |
|
13 | 13 | type ArrowDataContainerInput = { |
14 | 14 | cols: arrow.Vector[]; |
15 | 15 | fields?: ProtoDatasetField[]; |
| 16 | + arrowTable?: arrow.Table; |
16 | 17 | }; |
17 | 18 |
|
| 19 | + |
18 | 20 | /** |
19 | 21 | * @param dataContainer |
20 | 22 | * @param sharedRow |
@@ -68,7 +70,7 @@ export class ArrowDataContainer implements DataContainerInterface { |
68 | 70 | this._numChunks = data.cols[0].data.length; |
69 | 71 | // this._colData = data.cols.map(c => c.toArray()); |
70 | 72 |
|
71 | | - this._arrowTable = this._createTable(); |
| 73 | + this._arrowTable = data.arrowTable || this._createTable(); |
72 | 74 | } |
73 | 75 |
|
74 | 76 | /** |
|
0 commit comments