@loaders.gl/schema 3.1.0-alpha.4 → 3.1.0-beta.3
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.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +1289 -0
- package/dist/category/common.d.ts +20 -0
- package/dist/category/common.d.ts.map +1 -0
- package/dist/category/common.js +10 -0
- package/dist/category/gis.d.ts +50 -0
- package/dist/category/gis.d.ts.map +1 -0
- package/dist/category/gis.js +2 -0
- package/dist/category/mesh/convert-mesh.d.ts +15 -0
- package/dist/category/mesh/convert-mesh.d.ts.map +1 -0
- package/dist/category/mesh/convert-mesh.js +39 -0
- package/dist/category/mesh/deduce-mesh-schema.d.ts +24 -0
- package/dist/category/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/category/mesh/deduce-mesh-schema.js +62 -0
- package/dist/category/mesh/mesh-to-arrow-table.d.ts +1 -0
- package/dist/category/mesh/mesh-to-arrow-table.d.ts.map +1 -0
- package/dist/category/mesh/mesh-to-arrow-table.js +44 -0
- package/dist/category/mesh/mesh-types.d.ts +50 -0
- package/dist/category/mesh/mesh-types.d.ts.map +1 -0
- package/dist/category/mesh/mesh-types.js +2 -0
- package/dist/category/mesh/mesh-utils.d.ts +23 -0
- package/dist/category/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/category/mesh/mesh-utils.js +51 -0
- package/dist/category/table/deduce-table-schema.d.ts +9 -0
- package/dist/category/table/deduce-table-schema.d.ts.map +1 -0
- package/dist/category/table/deduce-table-schema.js +106 -0
- package/dist/category/table/table-types.d.ts +78 -0
- package/dist/category/table/table-types.d.ts.map +1 -0
- package/dist/category/table/table-types.js +2 -0
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/category/mesh/convert-mesh.js +2 -18
- package/dist/es5/category/mesh/convert-mesh.js.map +1 -1
- package/dist/es5/category/mesh/deduce-mesh-schema.js +9 -9
- package/dist/es5/category/mesh/deduce-mesh-schema.js.map +1 -1
- package/dist/es5/category/mesh/mesh-to-arrow-table.js +0 -38
- package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +1 -1
- package/dist/es5/category/mesh/mesh-utils.js +16 -16
- package/dist/es5/category/mesh/mesh-utils.js.map +1 -1
- package/dist/es5/category/table/deduce-table-schema.js +9 -9
- package/dist/es5/category/table/deduce-table-schema.js.map +1 -1
- package/dist/es5/index.js +53 -53
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/arrow/arrow-like-type-utils.js +1 -1
- package/dist/es5/lib/arrow/arrow-like-type-utils.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/es5/lib/arrow/get-type-info.js +4 -4
- package/dist/es5/lib/arrow/get-type-info.js.map +1 -1
- package/dist/es5/lib/batches/base-table-batch-aggregator.js +42 -53
- package/dist/es5/lib/batches/base-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js +71 -90
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/row-table-batch-aggregator.js +59 -70
- package/dist/es5/lib/batches/row-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/table-batch-builder.js +113 -133
- package/dist/es5/lib/batches/table-batch-builder.js.map +1 -1
- package/dist/es5/lib/schema/impl/enum.js +1 -1
- package/dist/es5/lib/schema/impl/field.js +19 -32
- package/dist/es5/lib/schema/impl/field.js.map +1 -1
- package/dist/es5/lib/schema/impl/schema.js +54 -119
- package/dist/es5/lib/schema/impl/schema.js.map +1 -1
- package/dist/es5/lib/schema/impl/type.js +395 -728
- package/dist/es5/lib/schema/impl/type.js.map +1 -1
- package/dist/es5/lib/schema/{index.js → schema.js} +38 -38
- package/dist/es5/lib/schema/schema.js.map +1 -0
- package/dist/es5/lib/schema-utils/deduce-column-type.js.map +1 -1
- package/dist/es5/lib/utils/async-queue.js +81 -164
- package/dist/es5/lib/utils/async-queue.js.map +1 -1
- package/dist/es5/lib/utils/row-utils.js +4 -4
- package/dist/es5/lib/utils/row-utils.js.map +1 -1
- package/dist/esm/category/mesh/convert-mesh.js +1 -8
- package/dist/esm/category/mesh/convert-mesh.js.map +1 -1
- package/dist/esm/category/mesh/deduce-mesh-schema.js +1 -1
- package/dist/esm/category/mesh/deduce-mesh-schema.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/category/table/deduce-table-schema.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/arrow/arrow-like-type-utils.js +1 -1
- package/dist/esm/lib/arrow/arrow-like-type-utils.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/esm/lib/arrow/get-type-info.js +1 -1
- package/dist/esm/lib/arrow/get-type-info.js.map +1 -1
- package/dist/esm/lib/batches/base-table-batch-aggregator.js.map +1 -1
- package/dist/esm/lib/batches/columnar-table-batch-aggregator.js.map +1 -1
- package/dist/esm/lib/batches/row-table-batch-aggregator.js.map +1 -1
- package/dist/esm/lib/batches/table-batch-builder.js.map +1 -1
- package/dist/esm/lib/schema/impl/field.js +1 -1
- package/dist/esm/lib/schema/impl/field.js.map +1 -1
- package/dist/esm/lib/schema/impl/schema.js.map +1 -1
- package/dist/esm/lib/schema/impl/type.js +8 -8
- package/dist/esm/lib/schema/impl/type.js.map +1 -1
- package/dist/esm/lib/schema/{index.js → schema.js} +1 -1
- package/dist/esm/lib/schema/schema.js.map +1 -0
- package/dist/esm/lib/schema-utils/deduce-column-type.js.map +1 -1
- package/dist/esm/lib/utils/async-queue.js.map +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -0
- package/dist/lib/arrow/arrow-like-type-utils.d.ts +4 -0
- package/dist/lib/arrow/arrow-like-type-utils.d.ts.map +1 -0
- package/dist/lib/arrow/arrow-like-type-utils.js +27 -0
- package/dist/lib/arrow/arrow-type-utils.d.ts +1 -0
- package/dist/lib/arrow/arrow-type-utils.d.ts.map +1 -0
- package/dist/lib/arrow/arrow-type-utils.js +70 -0
- package/dist/lib/arrow/get-type-info.d.ts +14 -0
- package/dist/lib/arrow/get-type-info.d.ts.map +1 -0
- package/dist/lib/arrow/get-type-info.js +28 -0
- package/dist/lib/batches/base-table-batch-aggregator.d.ts +19 -0
- package/dist/lib/batches/base-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/batches/base-table-batch-aggregator.js +58 -0
- package/dist/lib/batches/columnar-table-batch-aggregator.d.ts +23 -0
- package/dist/lib/batches/columnar-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/batches/columnar-table-batch-aggregator.js +90 -0
- package/dist/lib/batches/row-table-batch-aggregator.d.ts +22 -0
- package/dist/lib/batches/row-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/batches/row-table-batch-aggregator.js +79 -0
- package/dist/lib/batches/table-batch-aggregator.d.ts +25 -0
- package/dist/lib/batches/table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/batches/table-batch-aggregator.js +2 -0
- package/dist/lib/batches/table-batch-builder.d.ts +53 -0
- package/dist/lib/batches/table-batch-builder.d.ts.map +1 -0
- package/dist/lib/batches/table-batch-builder.js +153 -0
- package/dist/lib/schema/impl/enum.d.ts +92 -0
- package/dist/lib/schema/impl/enum.d.ts.map +1 -0
- package/dist/lib/schema/impl/enum.js +97 -0
- package/dist/lib/schema/impl/field.d.ts +19 -0
- package/dist/lib/schema/impl/field.d.ts.map +1 -0
- package/dist/lib/schema/impl/field.js +32 -0
- package/dist/lib/schema/impl/schema.d.ts +16 -0
- package/dist/lib/schema/impl/schema.d.ts.map +1 -0
- package/dist/lib/schema/impl/schema.js +83 -0
- package/dist/lib/schema/impl/type.d.ts +176 -0
- package/dist/lib/schema/impl/type.d.ts.map +1 -0
- package/dist/lib/schema/impl/type.js +462 -0
- package/dist/lib/schema/schema.d.ts +5 -0
- package/dist/lib/schema/schema.d.ts.map +1 -0
- package/dist/lib/schema/schema.js +90 -0
- package/dist/lib/schema-utils/deduce-column-type.d.ts +3 -0
- package/dist/lib/schema-utils/deduce-column-type.d.ts.map +1 -0
- package/dist/lib/schema-utils/deduce-column-type.js +92 -0
- package/dist/lib/utils/assert.d.ts +2 -0
- package/dist/lib/utils/assert.d.ts.map +1 -0
- package/dist/lib/utils/assert.js +12 -0
- package/dist/lib/utils/async-queue.d.ts +18 -0
- package/dist/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/lib/utils/async-queue.js +92 -0
- package/dist/lib/utils/row-utils.d.ts +9 -0
- package/dist/lib/utils/row-utils.d.ts.map +1 -0
- package/dist/lib/utils/row-utils.js +33 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/package.json +5 -7
- package/src/category/common.ts +2 -1
- package/src/category/mesh/convert-mesh.ts +6 -6
- package/src/category/mesh/deduce-mesh-schema.ts +1 -1
- package/src/category/mesh/mesh-to-arrow-table.ts +4 -2
- package/src/category/mesh/mesh-types.ts +1 -1
- package/src/category/table/deduce-table-schema.ts +1 -1
- package/src/category/table/table-types.ts +5 -2
- package/src/index.ts +1 -1
- package/src/lib/arrow/arrow-like-type-utils.ts +11 -1
- package/src/lib/arrow/arrow-type-utils.ts +2 -0
- package/src/lib/arrow/get-type-info.ts +1 -1
- package/src/lib/batches/base-table-batch-aggregator.ts +1 -1
- package/src/lib/batches/columnar-table-batch-aggregator.ts +1 -1
- package/src/lib/batches/row-table-batch-aggregator.ts +1 -1
- package/src/lib/batches/table-batch-aggregator.ts +1 -1
- package/src/lib/batches/table-batch-builder.ts +2 -2
- package/src/lib/schema/impl/schema.ts +2 -2
- package/src/lib/schema/impl/type.ts +2 -2
- package/src/lib/schema/{index.ts → schema.ts} +0 -0
- package/src/lib/schema-utils/deduce-column-type.ts +6 -2
- package/src/lib/utils/async-queue.ts +7 -4
- package/dist/dist.min.js +0 -2
- package/dist/dist.min.js.map +0 -1
- package/dist/es5/lib/schema/index.js.map +0 -1
- package/dist/esm/lib/schema/index.js.map +0 -1
package/dist/es5/index.js
CHANGED
|
@@ -7,313 +7,313 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
Object.defineProperty(exports, "TableBatchBuilder", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function
|
|
10
|
+
get: function () {
|
|
11
11
|
return _tableBatchBuilder.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "RowTableBatchAggregator", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function
|
|
16
|
+
get: function () {
|
|
17
17
|
return _rowTableBatchAggregator.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ColumnarTableBatchAggregator", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function
|
|
22
|
+
get: function () {
|
|
23
23
|
return _columnarTableBatchAggregator.default;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "convertToObjectRow", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function
|
|
28
|
+
get: function () {
|
|
29
29
|
return _rowUtils.convertToObjectRow;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "convertToArrayRow", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function
|
|
34
|
+
get: function () {
|
|
35
35
|
return _rowUtils.convertToArrayRow;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "getMeshSize", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function
|
|
40
|
+
get: function () {
|
|
41
41
|
return _meshUtils.getMeshSize;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "getMeshBoundingBox", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function
|
|
46
|
+
get: function () {
|
|
47
47
|
return _meshUtils.getMeshBoundingBox;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "convertMesh", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function
|
|
52
|
+
get: function () {
|
|
53
53
|
return _convertMesh.convertMesh;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "deduceMeshSchema", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function
|
|
58
|
+
get: function () {
|
|
59
59
|
return _deduceMeshSchema.deduceMeshSchema;
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "deduceMeshField", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function
|
|
64
|
+
get: function () {
|
|
65
65
|
return _deduceMeshSchema.deduceMeshField;
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "makeMeshAttributeMetadata", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function
|
|
70
|
+
get: function () {
|
|
71
71
|
return _deduceMeshSchema.makeMeshAttributeMetadata;
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "Schema", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function
|
|
76
|
+
get: function () {
|
|
77
77
|
return _schema.Schema;
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "Field", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function
|
|
82
|
+
get: function () {
|
|
83
83
|
return _schema.Field;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "DataType", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function
|
|
88
|
+
get: function () {
|
|
89
89
|
return _schema.DataType;
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "Null", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function
|
|
94
|
+
get: function () {
|
|
95
95
|
return _schema.Null;
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "Binary", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function
|
|
100
|
+
get: function () {
|
|
101
101
|
return _schema.Binary;
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "Bool", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function
|
|
106
|
+
get: function () {
|
|
107
107
|
return _schema.Bool;
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "Int", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function
|
|
112
|
+
get: function () {
|
|
113
113
|
return _schema.Int;
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "Int8", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function
|
|
118
|
+
get: function () {
|
|
119
119
|
return _schema.Int8;
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "Int16", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function
|
|
124
|
+
get: function () {
|
|
125
125
|
return _schema.Int16;
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "Int32", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function
|
|
130
|
+
get: function () {
|
|
131
131
|
return _schema.Int32;
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "Int64", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function
|
|
136
|
+
get: function () {
|
|
137
137
|
return _schema.Int64;
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "Uint8", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function
|
|
142
|
+
get: function () {
|
|
143
143
|
return _schema.Uint8;
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "Uint16", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function
|
|
148
|
+
get: function () {
|
|
149
149
|
return _schema.Uint16;
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "Uint32", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function
|
|
154
|
+
get: function () {
|
|
155
155
|
return _schema.Uint32;
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "Uint64", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function
|
|
160
|
+
get: function () {
|
|
161
161
|
return _schema.Uint64;
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "Float", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function
|
|
166
|
+
get: function () {
|
|
167
167
|
return _schema.Float;
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "Float16", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function
|
|
172
|
+
get: function () {
|
|
173
173
|
return _schema.Float16;
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "Float32", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function
|
|
178
|
+
get: function () {
|
|
179
179
|
return _schema.Float32;
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "Float64", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function
|
|
184
|
+
get: function () {
|
|
185
185
|
return _schema.Float64;
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "Utf8", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function
|
|
190
|
+
get: function () {
|
|
191
191
|
return _schema.Utf8;
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "Date", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function
|
|
196
|
+
get: function () {
|
|
197
197
|
return _schema.Date;
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "DateDay", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function
|
|
202
|
+
get: function () {
|
|
203
203
|
return _schema.DateDay;
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "DateMillisecond", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function
|
|
208
|
+
get: function () {
|
|
209
209
|
return _schema.DateMillisecond;
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
212
|
Object.defineProperty(exports, "Time", {
|
|
213
213
|
enumerable: true,
|
|
214
|
-
get: function
|
|
214
|
+
get: function () {
|
|
215
215
|
return _schema.Time;
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "TimeMillisecond", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function
|
|
220
|
+
get: function () {
|
|
221
221
|
return _schema.TimeMillisecond;
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "TimeSecond", {
|
|
225
225
|
enumerable: true,
|
|
226
|
-
get: function
|
|
226
|
+
get: function () {
|
|
227
227
|
return _schema.TimeSecond;
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "Timestamp", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function
|
|
232
|
+
get: function () {
|
|
233
233
|
return _schema.Timestamp;
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
236
|
Object.defineProperty(exports, "TimestampSecond", {
|
|
237
237
|
enumerable: true,
|
|
238
|
-
get: function
|
|
238
|
+
get: function () {
|
|
239
239
|
return _schema.TimestampSecond;
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "TimestampMillisecond", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function
|
|
244
|
+
get: function () {
|
|
245
245
|
return _schema.TimestampMillisecond;
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
248
|
Object.defineProperty(exports, "TimestampMicrosecond", {
|
|
249
249
|
enumerable: true,
|
|
250
|
-
get: function
|
|
250
|
+
get: function () {
|
|
251
251
|
return _schema.TimestampMicrosecond;
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "TimestampNanosecond", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function
|
|
256
|
+
get: function () {
|
|
257
257
|
return _schema.TimestampNanosecond;
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
Object.defineProperty(exports, "Interval", {
|
|
261
261
|
enumerable: true,
|
|
262
|
-
get: function
|
|
262
|
+
get: function () {
|
|
263
263
|
return _schema.Interval;
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "IntervalDayTime", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function
|
|
268
|
+
get: function () {
|
|
269
269
|
return _schema.IntervalDayTime;
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
Object.defineProperty(exports, "IntervalYearMonth", {
|
|
273
273
|
enumerable: true,
|
|
274
|
-
get: function
|
|
274
|
+
get: function () {
|
|
275
275
|
return _schema.IntervalYearMonth;
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
Object.defineProperty(exports, "FixedSizeList", {
|
|
279
279
|
enumerable: true,
|
|
280
|
-
get: function
|
|
280
|
+
get: function () {
|
|
281
281
|
return _schema.FixedSizeList;
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
284
|
Object.defineProperty(exports, "Struct", {
|
|
285
285
|
enumerable: true,
|
|
286
|
-
get: function
|
|
286
|
+
get: function () {
|
|
287
287
|
return _schema.Struct;
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
Object.defineProperty(exports, "deduceTypeFromColumn", {
|
|
291
291
|
enumerable: true,
|
|
292
|
-
get: function
|
|
292
|
+
get: function () {
|
|
293
293
|
return _deduceColumnType.deduceTypeFromColumn;
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
Object.defineProperty(exports, "deduceTypeFromValue", {
|
|
297
297
|
enumerable: true,
|
|
298
|
-
get: function
|
|
298
|
+
get: function () {
|
|
299
299
|
return _deduceColumnType.deduceTypeFromValue;
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
Object.defineProperty(exports, "getTypeInfo", {
|
|
303
303
|
enumerable: true,
|
|
304
|
-
get: function
|
|
304
|
+
get: function () {
|
|
305
305
|
return _getTypeInfo.getTypeInfo;
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
Object.defineProperty(exports, "getArrowTypeFromTypedArray", {
|
|
309
309
|
enumerable: true,
|
|
310
|
-
get: function
|
|
310
|
+
get: function () {
|
|
311
311
|
return _arrowLikeTypeUtils.getArrowTypeFromTypedArray;
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
314
|
Object.defineProperty(exports, "AsyncQueue", {
|
|
315
315
|
enumerable: true,
|
|
316
|
-
get: function
|
|
316
|
+
get: function () {
|
|
317
317
|
return _asyncQueue.default;
|
|
318
318
|
}
|
|
319
319
|
});
|
|
@@ -332,7 +332,7 @@ var _convertMesh = require("./category/mesh/convert-mesh");
|
|
|
332
332
|
|
|
333
333
|
var _deduceMeshSchema = require("./category/mesh/deduce-mesh-schema");
|
|
334
334
|
|
|
335
|
-
var _schema = require("./lib/schema");
|
|
335
|
+
var _schema = require("./lib/schema/schema");
|
|
336
336
|
|
|
337
337
|
var _deduceColumnType = require("./lib/schema-utils/deduce-column-type");
|
|
338
338
|
|
package/dist/es5/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;;AAEA;;AACA;;AAEA;;AAYA;;AACA;;AACA;;AAmCA;;AA0CA;;AACA;;AACA;;AAEA","sourcesContent":["// COMMON CATEGORY\nexport type {TypedArray, NumberArray, AnyArray} from './types';\n\nexport type {Batch} from './category/common';\n\n// TABLE CATEGORY TYPES\n\nexport type {\n Table,\n ArrayRowTable,\n ObjectRowTable,\n ColumnarTable,\n ArrowTable\n} from './category/table/table-types';\nexport type {\n TableBatch,\n RowArrayTableBatch,\n RowObjectTableBatch,\n ColumnarTableBatch,\n ArrowTableBatch\n} from './category/table/table-types';\n\n// TABLE CATEGORY UTILS\nexport {default as TableBatchBuilder} from './lib/batches/table-batch-builder';\nexport type {TableBatchAggregator} from './lib/batches/table-batch-aggregator';\nexport {default as RowTableBatchAggregator} from './lib/batches/row-table-batch-aggregator';\nexport {default as ColumnarTableBatchAggregator} from './lib/batches/columnar-table-batch-aggregator';\n\nexport {convertToObjectRow, convertToArrayRow} from './lib/utils/row-utils';\n\n// MESH CATEGORY\nexport type {\n MeshTable,\n MeshArrowTable,\n Mesh,\n MeshGeometry,\n MeshAttribute,\n MeshAttributes\n} from './category/mesh/mesh-types';\n\nexport {getMeshSize, getMeshBoundingBox} from './category/mesh/mesh-utils';\nexport {convertMesh} from './category/mesh/convert-mesh';\nexport {\n deduceMeshSchema,\n deduceMeshField,\n makeMeshAttributeMetadata\n} from './category/mesh/deduce-mesh-schema';\n\n// TYPES\n// GIS CATEGORY - GEOJSON\nexport type {GeoJSON, Feature, Geometry, Position, GeoJsonProperties} from './category/gis';\nexport type {\n Point,\n MultiPoint,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon\n} from './category/gis';\n\n// GIS CATEGORY - BINARY\nexport type {\n BinaryGeometryType,\n BinaryGeometry,\n BinaryPointGeometry,\n BinaryLineGeometry,\n BinaryPolygonGeometry,\n BinaryAttribute\n} from './category/gis';\nexport type {\n BinaryFeatures,\n BinaryPointFeatures,\n BinaryLineFeatures,\n BinaryPolygonFeatures\n} from './category/gis';\n\n// SCHEMA\nexport {\n Schema,\n Field,\n DataType,\n Null,\n Binary,\n Bool,\n Int,\n Int8,\n Int16,\n Int32,\n Int64,\n Uint8,\n Uint16,\n Uint32,\n Uint64,\n Float,\n Float16,\n Float32,\n Float64,\n Utf8,\n Date,\n DateDay,\n DateMillisecond,\n Time,\n TimeMillisecond,\n TimeSecond,\n Timestamp,\n TimestampSecond,\n TimestampMillisecond,\n TimestampMicrosecond,\n TimestampNanosecond,\n Interval,\n IntervalDayTime,\n IntervalYearMonth,\n FixedSizeList,\n Struct\n} from './lib/schema';\n\n// EXPERIMENTAL APIs\n\n// SCHEMA UTILS\nexport {deduceTypeFromColumn, deduceTypeFromValue} from './lib/schema-utils/deduce-column-type';\nexport {getTypeInfo} from './lib/arrow/get-type-info';\nexport {getArrowTypeFromTypedArray} from './lib/arrow/arrow-like-type-utils';\n\nexport {default as AsyncQueue} from './lib/utils/async-queue';\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;;AAEA;;AACA;;AAEA;;AAYA;;AACA;;AACA;;AAmCA;;AA0CA;;AACA;;AACA;;AAEA","sourcesContent":["// COMMON CATEGORY\nexport type {TypedArray, NumberArray, AnyArray} from './types';\n\nexport type {Batch} from './category/common';\n\n// TABLE CATEGORY TYPES\n\nexport type {\n Table,\n ArrayRowTable,\n ObjectRowTable,\n ColumnarTable,\n ArrowTable\n} from './category/table/table-types';\nexport type {\n TableBatch,\n RowArrayTableBatch,\n RowObjectTableBatch,\n ColumnarTableBatch,\n ArrowTableBatch\n} from './category/table/table-types';\n\n// TABLE CATEGORY UTILS\nexport {default as TableBatchBuilder} from './lib/batches/table-batch-builder';\nexport type {TableBatchAggregator} from './lib/batches/table-batch-aggregator';\nexport {default as RowTableBatchAggregator} from './lib/batches/row-table-batch-aggregator';\nexport {default as ColumnarTableBatchAggregator} from './lib/batches/columnar-table-batch-aggregator';\n\nexport {convertToObjectRow, convertToArrayRow} from './lib/utils/row-utils';\n\n// MESH CATEGORY\nexport type {\n MeshTable,\n MeshArrowTable,\n Mesh,\n MeshGeometry,\n MeshAttribute,\n MeshAttributes\n} from './category/mesh/mesh-types';\n\nexport {getMeshSize, getMeshBoundingBox} from './category/mesh/mesh-utils';\nexport {convertMesh} from './category/mesh/convert-mesh';\nexport {\n deduceMeshSchema,\n deduceMeshField,\n makeMeshAttributeMetadata\n} from './category/mesh/deduce-mesh-schema';\n\n// TYPES\n// GIS CATEGORY - GEOJSON\nexport type {GeoJSON, Feature, Geometry, Position, GeoJsonProperties} from './category/gis';\nexport type {\n Point,\n MultiPoint,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon\n} from './category/gis';\n\n// GIS CATEGORY - BINARY\nexport type {\n BinaryGeometryType,\n BinaryGeometry,\n BinaryPointGeometry,\n BinaryLineGeometry,\n BinaryPolygonGeometry,\n BinaryAttribute\n} from './category/gis';\nexport type {\n BinaryFeatures,\n BinaryPointFeatures,\n BinaryLineFeatures,\n BinaryPolygonFeatures\n} from './category/gis';\n\n// SCHEMA\nexport {\n Schema,\n Field,\n DataType,\n Null,\n Binary,\n Bool,\n Int,\n Int8,\n Int16,\n Int32,\n Int64,\n Uint8,\n Uint16,\n Uint32,\n Uint64,\n Float,\n Float16,\n Float32,\n Float64,\n Utf8,\n Date,\n DateDay,\n DateMillisecond,\n Time,\n TimeMillisecond,\n TimeSecond,\n Timestamp,\n TimestampSecond,\n TimestampMillisecond,\n TimestampMicrosecond,\n TimestampNanosecond,\n Interval,\n IntervalDayTime,\n IntervalYearMonth,\n FixedSizeList,\n Struct\n} from './lib/schema/schema';\n\n// EXPERIMENTAL APIs\n\n// SCHEMA UTILS\nexport {deduceTypeFromColumn, deduceTypeFromValue} from './lib/schema-utils/deduce-column-type';\nexport {getTypeInfo} from './lib/arrow/get-type-info';\nexport {getArrowTypeFromTypedArray} from './lib/arrow/arrow-like-type-utils';\n\nexport {default as AsyncQueue} from './lib/utils/async-queue';\n"],"file":"index.js"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getArrowTypeFromTypedArray = getArrowTypeFromTypedArray;
|
|
7
7
|
|
|
8
|
-
var _schema = require("../schema");
|
|
8
|
+
var _schema = require("../schema/schema");
|
|
9
9
|
|
|
10
10
|
function getArrowTypeFromTypedArray(array) {
|
|
11
11
|
switch (array.constructor) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/arrow/arrow-like-type-utils.ts"],"names":["getArrowTypeFromTypedArray","array","constructor","Int8Array","Int8","Uint8Array","Uint8","Int16Array","Int16","Uint16Array","Uint16","Int32Array","Int32","Uint32Array","Uint32","Float32Array","Float32","Float64Array","Float64","Error"],"mappings":";;;;;;;AACA;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/arrow/arrow-like-type-utils.ts"],"names":["getArrowTypeFromTypedArray","array","constructor","Int8Array","Int8","Uint8Array","Uint8","Int16Array","Int16","Uint16Array","Uint16","Int32Array","Int32","Uint32Array","Uint32","Float32Array","Float32","Float64Array","Float64","Error"],"mappings":";;;;;;;AACA;;AAYO,SAASA,0BAAT,CAAoCC,KAApC,EAAiE;AACtE,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAO,IAAIC,YAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,eAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,eAAJ,EAAP;;AACF;AACE,YAAM,IAAIC,KAAJ,CAAU,0BAAV,CAAN;AAlBJ;AAoBD","sourcesContent":["import type {TypedArray} from '../../types';\nimport {\n DataType,\n Float32,\n Float64,\n Int16,\n Int32,\n Int8,\n Uint16,\n Uint32,\n Uint8\n} from '../schema/schema';\n\nexport function getArrowTypeFromTypedArray(array: TypedArray): DataType {\n switch (array.constructor) {\n case Int8Array:\n return new Int8();\n case Uint8Array:\n return new Uint8();\n case Int16Array:\n return new Int16();\n case Uint16Array:\n return new Uint16();\n case Int32Array:\n return new Int32();\n case Uint32Array:\n return new Uint32();\n case Float32Array:\n return new Float32();\n case Float64Array:\n return new Float64();\n default:\n throw new Error('array type not supported');\n }\n}\n"],"file":"arrow-like-type-utils.js"}
|
|
@@ -1,72 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getArrowType = getArrowType;
|
|
7
|
-
exports.getArrowVector = getArrowVector;
|
|
8
|
-
|
|
9
|
-
var _Arrow = require("apache-arrow/Arrow.dom");
|
|
10
|
-
|
|
11
|
-
function getArrowType(array) {
|
|
12
|
-
switch (array.constructor) {
|
|
13
|
-
case Int8Array:
|
|
14
|
-
return new _Arrow.Int8();
|
|
15
|
-
|
|
16
|
-
case Uint8Array:
|
|
17
|
-
return new _Arrow.Uint8();
|
|
18
|
-
|
|
19
|
-
case Int16Array:
|
|
20
|
-
return new _Arrow.Int16();
|
|
21
|
-
|
|
22
|
-
case Uint16Array:
|
|
23
|
-
return new _Arrow.Uint16();
|
|
24
|
-
|
|
25
|
-
case Int32Array:
|
|
26
|
-
return new _Arrow.Int32();
|
|
27
|
-
|
|
28
|
-
case Uint32Array:
|
|
29
|
-
return new _Arrow.Uint32();
|
|
30
|
-
|
|
31
|
-
case Float32Array:
|
|
32
|
-
return new _Arrow.Float32();
|
|
33
|
-
|
|
34
|
-
case Float64Array:
|
|
35
|
-
return new _Arrow.Float64();
|
|
36
|
-
|
|
37
|
-
default:
|
|
38
|
-
throw new Error('array type not supported');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getArrowVector(array) {
|
|
43
|
-
switch (array.constructor) {
|
|
44
|
-
case Int8Array:
|
|
45
|
-
return _Arrow.Int8Vector.from(array);
|
|
46
|
-
|
|
47
|
-
case Uint8Array:
|
|
48
|
-
return _Arrow.Uint8Vector.from(array);
|
|
49
|
-
|
|
50
|
-
case Int16Array:
|
|
51
|
-
return _Arrow.Int16Vector.from(array);
|
|
52
|
-
|
|
53
|
-
case Uint16Array:
|
|
54
|
-
return _Arrow.Uint16Vector.from(array);
|
|
55
|
-
|
|
56
|
-
case Int32Array:
|
|
57
|
-
return _Arrow.Int32Vector.from(array);
|
|
58
|
-
|
|
59
|
-
case Uint32Array:
|
|
60
|
-
return _Arrow.Uint32Vector.from(array);
|
|
61
|
-
|
|
62
|
-
case Float32Array:
|
|
63
|
-
return _Arrow.Float32Vector.from(array);
|
|
64
|
-
|
|
65
|
-
case Float64Array:
|
|
66
|
-
return _Arrow.Float64Vector.from(array);
|
|
67
|
-
|
|
68
|
-
default:
|
|
69
|
-
throw new Error('array type not supported');
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
2
|
//# sourceMappingURL=arrow-type-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"arrow-type-utils.js"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getTypeInfo = getTypeInfo;
|
|
7
7
|
|
|
8
|
-
var _schema = require("../schema");
|
|
8
|
+
var _schema = require("../schema/schema");
|
|
9
9
|
|
|
10
10
|
function getTypeInfo(arrowTypeLike) {
|
|
11
11
|
return {
|
|
@@ -17,14 +17,14 @@ function getTypeInfo(arrowTypeLike) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
let ReverseType = null;
|
|
21
21
|
|
|
22
22
|
function getTypeKey(typeKey) {
|
|
23
23
|
if (!ReverseType) {
|
|
24
24
|
ReverseType = {};
|
|
25
25
|
|
|
26
|
-
for (
|
|
27
|
-
ReverseType[_schema.Type[
|
|
26
|
+
for (const key in _schema.Type) {
|
|
27
|
+
ReverseType[_schema.Type[key]] = key;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/arrow/get-type-info.ts"],"names":["getTypeInfo","arrowTypeLike","typeId","ArrayType","typeName","toString","typeEnumName","getTypeKey","precision","ReverseType","typeKey","key","Type"],"mappings":";;;;;;;AAAA;;AAOO,SAASA,WAAT,CAAqBC,aAArB,EAML;AACA,SAAO;AACLC,IAAAA,MAAM,EAAED,aAAa,CAACC,MADjB;AAELC,IAAAA,SAAS,EAAEF,aAAa,CAACE,SAFpB;AAGLC,IAAAA,QAAQ,EAAEH,aAAa,CAACI,QAAd,EAHL;AAILC,IAAAA,YAAY,EAAEC,UAAU,CAACN,aAAa,CAACC,MAAf,CAJnB;AAKLM,IAAAA,SAAS,EAAEP,aAAa,CAACO;AALpB,GAAP;AAOD;;AAED,IAAIC,WAA2C,GAAG,IAAlD;;AAEA,SAASF,UAAT,CAAoBG,OAApB,EAA6B;AAC3B,MAAI,CAACD,WAAL,EAAkB;AAChBA,IAAAA,WAAW,GAAG,EAAd;;AACA,SAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/arrow/get-type-info.ts"],"names":["getTypeInfo","arrowTypeLike","typeId","ArrayType","typeName","toString","typeEnumName","getTypeKey","precision","ReverseType","typeKey","key","Type"],"mappings":";;;;;;;AAAA;;AAOO,SAASA,WAAT,CAAqBC,aAArB,EAML;AACA,SAAO;AACLC,IAAAA,MAAM,EAAED,aAAa,CAACC,MADjB;AAELC,IAAAA,SAAS,EAAEF,aAAa,CAACE,SAFpB;AAGLC,IAAAA,QAAQ,EAAEH,aAAa,CAACI,QAAd,EAHL;AAILC,IAAAA,YAAY,EAAEC,UAAU,CAACN,aAAa,CAACC,MAAf,CAJnB;AAKLM,IAAAA,SAAS,EAAEP,aAAa,CAACO;AALpB,GAAP;AAOD;;AAED,IAAIC,WAA2C,GAAG,IAAlD;;AAEA,SAASF,UAAT,CAAoBG,OAApB,EAA6B;AAC3B,MAAI,CAACD,WAAL,EAAkB;AAChBA,IAAAA,WAAW,GAAG,EAAd;;AACA,SAAK,MAAME,GAAX,IAAkBC,YAAlB,EAAwB;AACtBH,MAAAA,WAAW,CAACG,aAAKD,GAAL,CAAD,CAAX,GAAyBA,GAAzB;AACD;AACF;;AAED,SAAOF,WAAW,CAACC,OAAD,CAAlB;AACD","sourcesContent":["import {Type} from '../schema/schema';\nimport {AnyArray} from '../../types';\n\n/**\n * Gets type information from an Arrow type object or \"mock\" Arrow type object\n * @param arrowTypeLike Arrow Type or type object of similar shape\n */\nexport function getTypeInfo(arrowTypeLike: any): {\n typeId: Type;\n ArrayType: AnyArray;\n typeName: string;\n typeEnumName?: string;\n precision?: number;\n} {\n return {\n typeId: arrowTypeLike.typeId,\n ArrayType: arrowTypeLike.ArrayType,\n typeName: arrowTypeLike.toString(),\n typeEnumName: getTypeKey(arrowTypeLike.typeId),\n precision: arrowTypeLike.precision\n };\n}\n\nlet ReverseType: {[key: string]: string} | null = null;\n\nfunction getTypeKey(typeKey) {\n if (!ReverseType) {\n ReverseType = {};\n for (const key in Type) {\n ReverseType[Type[key]] = key;\n }\n }\n\n return ReverseType[typeKey];\n}\n"],"file":"get-type-info.js"}
|
|
@@ -7,17 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
const DEFAULT_ROW_COUNT = 100;
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(0, _classCallCheck2.default)(this, RowTableBatchAggregator);
|
|
14
|
+
class RowTableBatchAggregator {
|
|
15
|
+
constructor(schema, options) {
|
|
21
16
|
(0, _defineProperty2.default)(this, "schema", void 0);
|
|
22
17
|
(0, _defineProperty2.default)(this, "options", void 0);
|
|
23
18
|
(0, _defineProperty2.default)(this, "length", 0);
|
|
@@ -30,63 +25,57 @@ var RowTableBatchAggregator = function () {
|
|
|
30
25
|
if (!Array.isArray(schema)) {
|
|
31
26
|
this._headers = [];
|
|
32
27
|
|
|
33
|
-
for (
|
|
28
|
+
for (const key in schema) {
|
|
34
29
|
this._headers[schema[key].index] = schema[key].name;
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return this.length;
|
|
43
|
-
}
|
|
44
|
-
}, {
|
|
45
|
-
key: "addArrayRow",
|
|
46
|
-
value: function addArrayRow(row, cursor) {
|
|
47
|
-
if (Number.isFinite(cursor)) {
|
|
48
|
-
this.cursor = cursor;
|
|
49
|
-
}
|
|
34
|
+
rowCount() {
|
|
35
|
+
return this.length;
|
|
36
|
+
}
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.
|
|
38
|
+
addArrayRow(row, cursor) {
|
|
39
|
+
if (Number.isFinite(cursor)) {
|
|
40
|
+
this.cursor = cursor;
|
|
54
41
|
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "addObjectRow",
|
|
57
|
-
value: function addObjectRow(row, cursor) {
|
|
58
|
-
if (Number.isFinite(cursor)) {
|
|
59
|
-
this.cursor = cursor;
|
|
60
|
-
}
|
|
61
42
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
43
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
44
|
+
this.rows[this.length] = row;
|
|
45
|
+
this.length++;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
addObjectRow(row, cursor) {
|
|
49
|
+
if (Number.isFinite(cursor)) {
|
|
50
|
+
this.cursor = cursor;
|
|
65
51
|
}
|
|
66
|
-
}, {
|
|
67
|
-
key: "getBatch",
|
|
68
|
-
value: function getBatch() {
|
|
69
|
-
var rows = this.rows;
|
|
70
52
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
53
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
54
|
+
this.rows[this.length] = row;
|
|
55
|
+
this.length++;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getBatch() {
|
|
59
|
+
let rows = this.rows;
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var batch = {
|
|
78
|
-
shape: this.options.shape,
|
|
79
|
-
batchType: 'data',
|
|
80
|
-
data: rows,
|
|
81
|
-
length: this.length,
|
|
82
|
-
schema: this.schema,
|
|
83
|
-
cursor: this.cursor
|
|
84
|
-
};
|
|
85
|
-
return batch;
|
|
61
|
+
if (!rows) {
|
|
62
|
+
return null;
|
|
86
63
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
|
|
65
|
+
rows = rows.slice(0, this.length);
|
|
66
|
+
this.rows = null;
|
|
67
|
+
const batch = {
|
|
68
|
+
shape: this.options.shape,
|
|
69
|
+
batchType: 'data',
|
|
70
|
+
data: rows,
|
|
71
|
+
length: this.length,
|
|
72
|
+
schema: this.schema,
|
|
73
|
+
cursor: this.cursor
|
|
74
|
+
};
|
|
75
|
+
return batch;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
}
|
|
90
79
|
|
|
91
80
|
exports.default = RowTableBatchAggregator;
|
|
92
81
|
//# sourceMappingURL=base-table-batch-aggregator.js.map
|