@loaders.gl/schema 3.1.3 → 4.0.0-alpha.5

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.
Files changed (194) hide show
  1. package/dist/bundle.js +2 -2
  2. package/dist/bundle.js.map +1 -0
  3. package/dist/category/common.d.ts +1 -2
  4. package/dist/category/common.d.ts.map +1 -1
  5. package/dist/category/common.js +2 -10
  6. package/dist/{es5/category → category}/common.js.map +0 -0
  7. package/dist/category/gis.js +2 -2
  8. package/dist/{es5/category → category}/gis.js.map +0 -0
  9. package/dist/category/image/image.d.ts +18 -0
  10. package/dist/category/image/image.d.ts.map +1 -0
  11. package/dist/category/image/image.js +2 -0
  12. package/dist/{esm/category/gis.js.map → category/image/image.js.map} +1 -1
  13. package/dist/category/mesh/convert-mesh.js +31 -37
  14. package/dist/category/mesh/convert-mesh.js.map +1 -0
  15. package/dist/category/mesh/deduce-mesh-schema.js +37 -57
  16. package/dist/category/mesh/deduce-mesh-schema.js.map +1 -0
  17. package/dist/category/mesh/mesh-to-arrow-table.d.ts +10 -0
  18. package/dist/category/mesh/mesh-to-arrow-table.d.ts.map +1 -1
  19. package/dist/category/mesh/mesh-to-arrow-table.js +15 -28
  20. package/dist/category/mesh/mesh-to-arrow-table.js.map +1 -0
  21. package/dist/category/mesh/mesh-types.js +2 -2
  22. package/dist/{es5/category → category}/mesh/mesh-types.js.map +0 -0
  23. package/dist/category/mesh/mesh-utils.js +35 -48
  24. package/dist/category/mesh/mesh-utils.js.map +1 -0
  25. package/dist/category/table/deduce-table-schema.js +39 -94
  26. package/dist/category/table/deduce-table-schema.js.map +1 -0
  27. package/dist/category/table/table-types.d.ts +1 -3
  28. package/dist/category/table/table-types.d.ts.map +1 -1
  29. package/dist/category/table/table-types.js +2 -2
  30. package/dist/{es5/category → category}/table/table-types.js.map +0 -0
  31. package/dist/category/texture/texture.d.ts +18 -0
  32. package/dist/category/texture/texture.d.ts.map +1 -0
  33. package/dist/category/texture/texture.js +2 -0
  34. package/dist/{esm/category/common.js.map → category/texture/texture.js.map} +1 -1
  35. package/dist/dist.min.js +15078 -208
  36. package/dist/index.d.ts +2 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +13 -75
  39. package/dist/index.js.map +1 -0
  40. package/dist/lib/arrow/arrow-like-type-utils.js +31 -26
  41. package/dist/lib/arrow/arrow-like-type-utils.js.map +1 -0
  42. package/dist/lib/arrow/arrow-type-utils.d.ts +5 -0
  43. package/dist/lib/arrow/arrow-type-utils.d.ts.map +1 -1
  44. package/dist/lib/arrow/arrow-type-utils.js +20 -28
  45. package/dist/lib/arrow/arrow-type-utils.js.map +1 -0
  46. package/dist/lib/arrow/get-type-info.js +19 -23
  47. package/dist/lib/arrow/get-type-info.js.map +1 -0
  48. package/dist/lib/batches/base-table-batch-aggregator.js +68 -52
  49. package/dist/lib/batches/base-table-batch-aggregator.js.map +1 -0
  50. package/dist/lib/batches/columnar-table-batch-aggregator.js +92 -82
  51. package/dist/lib/batches/columnar-table-batch-aggregator.js.map +1 -0
  52. package/dist/lib/batches/row-table-batch-aggregator.js +88 -72
  53. package/dist/lib/batches/row-table-batch-aggregator.js.map +1 -0
  54. package/dist/lib/batches/table-batch-aggregator.js +2 -2
  55. package/dist/{es5/lib → lib}/batches/table-batch-aggregator.js.map +0 -0
  56. package/dist/lib/batches/table-batch-builder.js +166 -137
  57. package/dist/lib/batches/table-batch-builder.js.map +1 -0
  58. package/dist/lib/schema/impl/enum.js +48 -96
  59. package/dist/lib/schema/impl/enum.js.map +1 -0
  60. package/dist/lib/schema/impl/field.js +34 -31
  61. package/dist/lib/schema/impl/field.js.map +1 -0
  62. package/dist/lib/schema/impl/schema.js +81 -72
  63. package/dist/lib/schema/impl/schema.js.map +1 -0
  64. package/dist/lib/schema/impl/type.js +490 -454
  65. package/dist/lib/schema/impl/type.js.map +1 -0
  66. package/dist/lib/schema/schema.js +5 -90
  67. package/dist/lib/schema/schema.js.map +1 -0
  68. package/dist/lib/schema-utils/deduce-column-type.js +20 -89
  69. package/dist/lib/schema-utils/deduce-column-type.js.map +1 -0
  70. package/dist/lib/utils/assert.js +5 -11
  71. package/dist/lib/utils/assert.js.map +1 -0
  72. package/dist/lib/utils/async-queue.js +109 -82
  73. package/dist/lib/utils/async-queue.js.map +1 -0
  74. package/dist/lib/utils/row-utils.js +33 -31
  75. package/dist/lib/utils/row-utils.js.map +1 -0
  76. package/dist/types.js +2 -2
  77. package/dist/{es5/types.js.map → types.js.map} +0 -0
  78. package/package.json +6 -5
  79. package/src/category/common.ts +1 -2
  80. package/src/category/image/image.ts +19 -0
  81. package/src/category/mesh/convert-mesh.ts +6 -6
  82. package/src/category/mesh/mesh-to-arrow-table.ts +2 -4
  83. package/src/category/table/table-types.ts +1 -4
  84. package/src/category/texture/texture.ts +28 -0
  85. package/src/index.ts +6 -1
  86. package/src/lib/arrow/arrow-type-utils.ts +0 -2
  87. package/dist/es5/bundle.js +0 -7
  88. package/dist/es5/bundle.js.map +0 -1
  89. package/dist/es5/category/common.js +0 -2
  90. package/dist/es5/category/gis.js +0 -2
  91. package/dist/es5/category/mesh/convert-mesh.js +0 -43
  92. package/dist/es5/category/mesh/convert-mesh.js.map +0 -1
  93. package/dist/es5/category/mesh/deduce-mesh-schema.js +0 -54
  94. package/dist/es5/category/mesh/deduce-mesh-schema.js.map +0 -1
  95. package/dist/es5/category/mesh/mesh-to-arrow-table.js +0 -2
  96. package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +0 -1
  97. package/dist/es5/category/mesh/mesh-types.js +0 -2
  98. package/dist/es5/category/mesh/mesh-utils.js +0 -47
  99. package/dist/es5/category/mesh/mesh-utils.js.map +0 -1
  100. package/dist/es5/category/table/deduce-table-schema.js +0 -58
  101. package/dist/es5/category/table/deduce-table-schema.js.map +0 -1
  102. package/dist/es5/category/table/table-types.js +0 -2
  103. package/dist/es5/index.js +0 -344
  104. package/dist/es5/index.js.map +0 -1
  105. package/dist/es5/lib/arrow/arrow-like-type-utils.js +0 -40
  106. package/dist/es5/lib/arrow/arrow-like-type-utils.js.map +0 -1
  107. package/dist/es5/lib/arrow/arrow-type-utils.js +0 -2
  108. package/dist/es5/lib/arrow/arrow-type-utils.js.map +0 -1
  109. package/dist/es5/lib/arrow/get-type-info.js +0 -33
  110. package/dist/es5/lib/arrow/get-type-info.js.map +0 -1
  111. package/dist/es5/lib/batches/base-table-batch-aggregator.js +0 -92
  112. package/dist/es5/lib/batches/base-table-batch-aggregator.js.map +0 -1
  113. package/dist/es5/lib/batches/columnar-table-batch-aggregator.js +0 -128
  114. package/dist/es5/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
  115. package/dist/es5/lib/batches/row-table-batch-aggregator.js +0 -113
  116. package/dist/es5/lib/batches/row-table-batch-aggregator.js.map +0 -1
  117. package/dist/es5/lib/batches/table-batch-aggregator.js +0 -2
  118. package/dist/es5/lib/batches/table-batch-builder.js +0 -207
  119. package/dist/es5/lib/batches/table-batch-builder.js.map +0 -1
  120. package/dist/es5/lib/schema/impl/enum.js +0 -56
  121. package/dist/es5/lib/schema/impl/enum.js.map +0 -1
  122. package/dist/es5/lib/schema/impl/field.js +0 -56
  123. package/dist/es5/lib/schema/impl/field.js.map +0 -1
  124. package/dist/es5/lib/schema/impl/schema.js +0 -168
  125. package/dist/es5/lib/schema/impl/schema.js.map +0 -1
  126. package/dist/es5/lib/schema/impl/type.js +0 -927
  127. package/dist/es5/lib/schema/impl/type.js.map +0 -1
  128. package/dist/es5/lib/schema/schema.js +0 -236
  129. package/dist/es5/lib/schema/schema.js.map +0 -1
  130. package/dist/es5/lib/schema-utils/deduce-column-type.js +0 -32
  131. package/dist/es5/lib/schema-utils/deduce-column-type.js.map +0 -1
  132. package/dist/es5/lib/utils/assert.js +0 -13
  133. package/dist/es5/lib/utils/assert.js.map +0 -1
  134. package/dist/es5/lib/utils/async-queue.js +0 -213
  135. package/dist/es5/lib/utils/async-queue.js.map +0 -1
  136. package/dist/es5/lib/utils/row-utils.js +0 -44
  137. package/dist/es5/lib/utils/row-utils.js.map +0 -1
  138. package/dist/es5/types.js +0 -2
  139. package/dist/esm/bundle.js +0 -5
  140. package/dist/esm/bundle.js.map +0 -1
  141. package/dist/esm/category/common.js +0 -2
  142. package/dist/esm/category/gis.js +0 -2
  143. package/dist/esm/category/mesh/convert-mesh.js +0 -26
  144. package/dist/esm/category/mesh/convert-mesh.js.map +0 -1
  145. package/dist/esm/category/mesh/deduce-mesh-schema.js +0 -42
  146. package/dist/esm/category/mesh/deduce-mesh-schema.js.map +0 -1
  147. package/dist/esm/category/mesh/mesh-to-arrow-table.js +0 -2
  148. package/dist/esm/category/mesh/mesh-to-arrow-table.js.map +0 -1
  149. package/dist/esm/category/mesh/mesh-types.js +0 -2
  150. package/dist/esm/category/mesh/mesh-types.js.map +0 -1
  151. package/dist/esm/category/mesh/mesh-utils.js +0 -38
  152. package/dist/esm/category/mesh/mesh-utils.js.map +0 -1
  153. package/dist/esm/category/table/deduce-table-schema.js +0 -51
  154. package/dist/esm/category/table/deduce-table-schema.js.map +0 -1
  155. package/dist/esm/category/table/table-types.js +0 -2
  156. package/dist/esm/category/table/table-types.js.map +0 -1
  157. package/dist/esm/index.js +0 -13
  158. package/dist/esm/index.js.map +0 -1
  159. package/dist/esm/lib/arrow/arrow-like-type-utils.js +0 -32
  160. package/dist/esm/lib/arrow/arrow-like-type-utils.js.map +0 -1
  161. package/dist/esm/lib/arrow/arrow-type-utils.js +0 -2
  162. package/dist/esm/lib/arrow/arrow-type-utils.js.map +0 -1
  163. package/dist/esm/lib/arrow/get-type-info.js +0 -24
  164. package/dist/esm/lib/arrow/get-type-info.js.map +0 -1
  165. package/dist/esm/lib/batches/base-table-batch-aggregator.js +0 -74
  166. package/dist/esm/lib/batches/base-table-batch-aggregator.js.map +0 -1
  167. package/dist/esm/lib/batches/columnar-table-batch-aggregator.js +0 -100
  168. package/dist/esm/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
  169. package/dist/esm/lib/batches/row-table-batch-aggregator.js +0 -95
  170. package/dist/esm/lib/batches/row-table-batch-aggregator.js.map +0 -1
  171. package/dist/esm/lib/batches/table-batch-aggregator.js +0 -2
  172. package/dist/esm/lib/batches/table-batch-aggregator.js.map +0 -1
  173. package/dist/esm/lib/batches/table-batch-builder.js +0 -182
  174. package/dist/esm/lib/batches/table-batch-builder.js.map +0 -1
  175. package/dist/esm/lib/schema/impl/enum.js +0 -49
  176. package/dist/esm/lib/schema/impl/enum.js.map +0 -1
  177. package/dist/esm/lib/schema/impl/field.js +0 -35
  178. package/dist/esm/lib/schema/impl/field.js.map +0 -1
  179. package/dist/esm/lib/schema/impl/schema.js +0 -92
  180. package/dist/esm/lib/schema/impl/schema.js.map +0 -1
  181. package/dist/esm/lib/schema/impl/type.js +0 -498
  182. package/dist/esm/lib/schema/impl/type.js.map +0 -1
  183. package/dist/esm/lib/schema/schema.js +0 -5
  184. package/dist/esm/lib/schema/schema.js.map +0 -1
  185. package/dist/esm/lib/schema-utils/deduce-column-type.js +0 -23
  186. package/dist/esm/lib/schema-utils/deduce-column-type.js.map +0 -1
  187. package/dist/esm/lib/utils/assert.js +0 -6
  188. package/dist/esm/lib/utils/assert.js.map +0 -1
  189. package/dist/esm/lib/utils/async-queue.js +0 -119
  190. package/dist/esm/lib/utils/async-queue.js.map +0 -1
  191. package/dist/esm/lib/utils/row-utils.js +0 -35
  192. package/dist/esm/lib/utils/row-utils.js.map +0 -1
  193. package/dist/esm/types.js +0 -2
  194. package/dist/esm/types.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -11,6 +11,8 @@ export type { MeshTable, MeshArrowTable, Mesh, MeshGeometry, MeshAttribute, Mesh
11
11
  export { getMeshSize, getMeshBoundingBox } from './category/mesh/mesh-utils';
12
12
  export { convertMesh } from './category/mesh/convert-mesh';
13
13
  export { deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata } from './category/mesh/deduce-mesh-schema';
14
+ export type { TextureLevel, GPUTextureFormat } from './category/texture/texture';
15
+ export type { ImageDataType, ImageType, ImageTypeEnum } from './category/image/image';
14
16
  export type { GeoJSON, Feature, Geometry, Position, GeoJsonProperties } from './category/gis';
15
17
  export type { Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection } from './category/gis';
16
18
  export type { GeojsonGeometryInfo } from './category/gis';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE/D,YAAY,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAI7C,YAAY,EACV,KAAK,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,mCAAmC,CAAC;AAC/E,YAAY,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAC,OAAO,IAAI,4BAA4B,EAAC,MAAM,+CAA+C,CAAC;AAEtG,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAI5C,YAAY,EA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,IAAI,UAAU,EAAC,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -1,75 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTypeInfo = exports.deduceTypeFromValue = exports.deduceTypeFromColumn = exports.Struct = exports.FixedSizeList = exports.IntervalYearMonth = exports.IntervalDayTime = exports.Interval = exports.TimestampNanosecond = exports.TimestampMicrosecond = exports.TimestampMillisecond = exports.TimestampSecond = exports.Timestamp = exports.TimeSecond = exports.TimeMillisecond = exports.Time = exports.DateMillisecond = exports.DateDay = exports.Date = exports.Utf8 = exports.Float64 = exports.Float32 = exports.Float16 = exports.Float = exports.Uint64 = exports.Uint32 = exports.Uint16 = exports.Uint8 = exports.Int64 = exports.Int32 = exports.Int16 = exports.Int8 = exports.Int = exports.Bool = exports.Binary = exports.Null = exports.DataType = exports.Field = exports.Schema = exports.makeMeshAttributeMetadata = exports.deduceMeshField = exports.deduceMeshSchema = exports.convertMesh = exports.getMeshBoundingBox = exports.getMeshSize = exports.convertToArrayRow = exports.convertToObjectRow = exports.ColumnarTableBatchAggregator = exports.RowTableBatchAggregator = exports.TableBatchBuilder = void 0;
7
- exports.AsyncQueue = exports.getArrowTypeFromTypedArray = void 0;
8
- // TABLE CATEGORY UTILS
9
- var table_batch_builder_1 = require("./lib/batches/table-batch-builder");
10
- Object.defineProperty(exports, "TableBatchBuilder", { enumerable: true, get: function () { return __importDefault(table_batch_builder_1).default; } });
11
- var row_table_batch_aggregator_1 = require("./lib/batches/row-table-batch-aggregator");
12
- Object.defineProperty(exports, "RowTableBatchAggregator", { enumerable: true, get: function () { return __importDefault(row_table_batch_aggregator_1).default; } });
13
- var columnar_table_batch_aggregator_1 = require("./lib/batches/columnar-table-batch-aggregator");
14
- Object.defineProperty(exports, "ColumnarTableBatchAggregator", { enumerable: true, get: function () { return __importDefault(columnar_table_batch_aggregator_1).default; } });
15
- var row_utils_1 = require("./lib/utils/row-utils");
16
- Object.defineProperty(exports, "convertToObjectRow", { enumerable: true, get: function () { return row_utils_1.convertToObjectRow; } });
17
- Object.defineProperty(exports, "convertToArrayRow", { enumerable: true, get: function () { return row_utils_1.convertToArrayRow; } });
18
- var mesh_utils_1 = require("./category/mesh/mesh-utils");
19
- Object.defineProperty(exports, "getMeshSize", { enumerable: true, get: function () { return mesh_utils_1.getMeshSize; } });
20
- Object.defineProperty(exports, "getMeshBoundingBox", { enumerable: true, get: function () { return mesh_utils_1.getMeshBoundingBox; } });
21
- var convert_mesh_1 = require("./category/mesh/convert-mesh");
22
- Object.defineProperty(exports, "convertMesh", { enumerable: true, get: function () { return convert_mesh_1.convertMesh; } });
23
- var deduce_mesh_schema_1 = require("./category/mesh/deduce-mesh-schema");
24
- Object.defineProperty(exports, "deduceMeshSchema", { enumerable: true, get: function () { return deduce_mesh_schema_1.deduceMeshSchema; } });
25
- Object.defineProperty(exports, "deduceMeshField", { enumerable: true, get: function () { return deduce_mesh_schema_1.deduceMeshField; } });
26
- Object.defineProperty(exports, "makeMeshAttributeMetadata", { enumerable: true, get: function () { return deduce_mesh_schema_1.makeMeshAttributeMetadata; } });
27
- // SCHEMA
28
- var schema_1 = require("./lib/schema/schema");
29
- Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return schema_1.Schema; } });
30
- Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return schema_1.Field; } });
31
- Object.defineProperty(exports, "DataType", { enumerable: true, get: function () { return schema_1.DataType; } });
32
- Object.defineProperty(exports, "Null", { enumerable: true, get: function () { return schema_1.Null; } });
33
- Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return schema_1.Binary; } });
34
- Object.defineProperty(exports, "Bool", { enumerable: true, get: function () { return schema_1.Bool; } });
35
- Object.defineProperty(exports, "Int", { enumerable: true, get: function () { return schema_1.Int; } });
36
- Object.defineProperty(exports, "Int8", { enumerable: true, get: function () { return schema_1.Int8; } });
37
- Object.defineProperty(exports, "Int16", { enumerable: true, get: function () { return schema_1.Int16; } });
38
- Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { return schema_1.Int32; } });
39
- Object.defineProperty(exports, "Int64", { enumerable: true, get: function () { return schema_1.Int64; } });
40
- Object.defineProperty(exports, "Uint8", { enumerable: true, get: function () { return schema_1.Uint8; } });
41
- Object.defineProperty(exports, "Uint16", { enumerable: true, get: function () { return schema_1.Uint16; } });
42
- Object.defineProperty(exports, "Uint32", { enumerable: true, get: function () { return schema_1.Uint32; } });
43
- Object.defineProperty(exports, "Uint64", { enumerable: true, get: function () { return schema_1.Uint64; } });
44
- Object.defineProperty(exports, "Float", { enumerable: true, get: function () { return schema_1.Float; } });
45
- Object.defineProperty(exports, "Float16", { enumerable: true, get: function () { return schema_1.Float16; } });
46
- Object.defineProperty(exports, "Float32", { enumerable: true, get: function () { return schema_1.Float32; } });
47
- Object.defineProperty(exports, "Float64", { enumerable: true, get: function () { return schema_1.Float64; } });
48
- Object.defineProperty(exports, "Utf8", { enumerable: true, get: function () { return schema_1.Utf8; } });
49
- Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return schema_1.Date; } });
50
- Object.defineProperty(exports, "DateDay", { enumerable: true, get: function () { return schema_1.DateDay; } });
51
- Object.defineProperty(exports, "DateMillisecond", { enumerable: true, get: function () { return schema_1.DateMillisecond; } });
52
- Object.defineProperty(exports, "Time", { enumerable: true, get: function () { return schema_1.Time; } });
53
- Object.defineProperty(exports, "TimeMillisecond", { enumerable: true, get: function () { return schema_1.TimeMillisecond; } });
54
- Object.defineProperty(exports, "TimeSecond", { enumerable: true, get: function () { return schema_1.TimeSecond; } });
55
- Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return schema_1.Timestamp; } });
56
- Object.defineProperty(exports, "TimestampSecond", { enumerable: true, get: function () { return schema_1.TimestampSecond; } });
57
- Object.defineProperty(exports, "TimestampMillisecond", { enumerable: true, get: function () { return schema_1.TimestampMillisecond; } });
58
- Object.defineProperty(exports, "TimestampMicrosecond", { enumerable: true, get: function () { return schema_1.TimestampMicrosecond; } });
59
- Object.defineProperty(exports, "TimestampNanosecond", { enumerable: true, get: function () { return schema_1.TimestampNanosecond; } });
60
- Object.defineProperty(exports, "Interval", { enumerable: true, get: function () { return schema_1.Interval; } });
61
- Object.defineProperty(exports, "IntervalDayTime", { enumerable: true, get: function () { return schema_1.IntervalDayTime; } });
62
- Object.defineProperty(exports, "IntervalYearMonth", { enumerable: true, get: function () { return schema_1.IntervalYearMonth; } });
63
- Object.defineProperty(exports, "FixedSizeList", { enumerable: true, get: function () { return schema_1.FixedSizeList; } });
64
- Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return schema_1.Struct; } });
65
- // EXPERIMENTAL APIs
66
- // SCHEMA UTILS
67
- var deduce_column_type_1 = require("./lib/schema-utils/deduce-column-type");
68
- Object.defineProperty(exports, "deduceTypeFromColumn", { enumerable: true, get: function () { return deduce_column_type_1.deduceTypeFromColumn; } });
69
- Object.defineProperty(exports, "deduceTypeFromValue", { enumerable: true, get: function () { return deduce_column_type_1.deduceTypeFromValue; } });
70
- var get_type_info_1 = require("./lib/arrow/get-type-info");
71
- Object.defineProperty(exports, "getTypeInfo", { enumerable: true, get: function () { return get_type_info_1.getTypeInfo; } });
72
- var arrow_like_type_utils_1 = require("./lib/arrow/arrow-like-type-utils");
73
- Object.defineProperty(exports, "getArrowTypeFromTypedArray", { enumerable: true, get: function () { return arrow_like_type_utils_1.getArrowTypeFromTypedArray; } });
74
- var async_queue_1 = require("./lib/utils/async-queue");
75
- Object.defineProperty(exports, "AsyncQueue", { enumerable: true, get: function () { return __importDefault(async_queue_1).default; } });
1
+ export { default as TableBatchBuilder } from './lib/batches/table-batch-builder';
2
+ export { default as RowTableBatchAggregator } from './lib/batches/row-table-batch-aggregator';
3
+ export { default as ColumnarTableBatchAggregator } from './lib/batches/columnar-table-batch-aggregator';
4
+ export { convertToObjectRow, convertToArrayRow } from './lib/utils/row-utils';
5
+ export { getMeshSize, getMeshBoundingBox } from './category/mesh/mesh-utils';
6
+ export { convertMesh } from './category/mesh/convert-mesh';
7
+ export { deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata } from './category/mesh/deduce-mesh-schema';
8
+ export { Schema, Field, DataType, Null, Binary, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct } from './lib/schema/schema';
9
+ export { deduceTypeFromColumn, deduceTypeFromValue } from './lib/schema-utils/deduce-column-type';
10
+ export { getTypeInfo } from './lib/arrow/get-type-info';
11
+ export { getArrowTypeFromTypedArray } from './lib/arrow/arrow-like-type-utils';
12
+ export { default as AsyncQueue } from './lib/utils/async-queue';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":["default","TableBatchBuilder","RowTableBatchAggregator","ColumnarTableBatchAggregator","convertToObjectRow","convertToArrayRow","getMeshSize","getMeshBoundingBox","convertMesh","deduceMeshSchema","deduceMeshField","makeMeshAttributeMetadata","Schema","Field","DataType","Null","Binary","Bool","Int","Int8","Int16","Int32","Int64","Uint8","Uint16","Uint32","Uint64","Float","Float16","Float32","Float64","Utf8","Date","DateDay","DateMillisecond","Time","TimeMillisecond","TimeSecond","Timestamp","TimestampSecond","TimestampMillisecond","TimestampMicrosecond","TimestampNanosecond","Interval","IntervalDayTime","IntervalYearMonth","FixedSizeList","Struct","deduceTypeFromColumn","deduceTypeFromValue","getTypeInfo","getArrowTypeFromTypedArray","AsyncQueue"],"mappings":"AAsBA,SAAQA,OAAO,IAAIC,iBAAnB,QAA2C,mCAA3C;AAEA,SAAQD,OAAO,IAAIE,uBAAnB,QAAiD,0CAAjD;AACA,SAAQF,OAAO,IAAIG,4BAAnB,QAAsD,+CAAtD;AAEA,SAAQC,kBAAR,EAA4BC,iBAA5B,QAAoD,uBAApD;AAYA,SAAQC,WAAR,EAAqBC,kBAArB,QAA8C,4BAA9C;AACA,SAAQC,WAAR,QAA0B,8BAA1B;AACA,SACEC,gBADF,EAEEC,eAFF,EAGEC,yBAHF,QAIO,oCAJP;AAuDA,SACEC,MADF,EAEEC,KAFF,EAGEC,QAHF,EAIEC,IAJF,EAKEC,MALF,EAMEC,IANF,EAOEC,GAPF,EAQEC,IARF,EASEC,KATF,EAUEC,KAVF,EAWEC,KAXF,EAYEC,KAZF,EAaEC,MAbF,EAcEC,MAdF,EAeEC,MAfF,EAgBEC,KAhBF,EAiBEC,OAjBF,EAkBEC,OAlBF,EAmBEC,OAnBF,EAoBEC,IApBF,EAqBEC,IArBF,EAsBEC,OAtBF,EAuBEC,eAvBF,EAwBEC,IAxBF,EAyBEC,eAzBF,EA0BEC,UA1BF,EA2BEC,SA3BF,EA4BEC,eA5BF,EA6BEC,oBA7BF,EA8BEC,oBA9BF,EA+BEC,mBA/BF,EAgCEC,QAhCF,EAiCEC,eAjCF,EAkCEC,iBAlCF,EAmCEC,aAnCF,EAoCEC,MApCF,QAqCO,qBArCP;AA0CA,SAAQC,oBAAR,EAA8BC,mBAA9B,QAAwD,uCAAxD;AACA,SAAQC,WAAR,QAA0B,2BAA1B;AACA,SAAQC,0BAAR,QAAyC,mCAAzC;AAEA,SAAQnD,OAAO,IAAIoD,UAAnB,QAAoC,yBAApC","sourcesContent":["// COMMON CATEGORY\nexport type {TypedArray, NumberArray, AnyArray} from './types';\n\nexport type {Batch} from './category/common';\n\n// TABLE CATEGORY TYPES\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// TEXTURES\nexport type {TextureLevel, GPUTextureFormat} from './category/texture/texture';\n\n// IMAGES\nexport type {ImageDataType, ImageType, ImageTypeEnum} from './category/image/image';\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 GeometryCollection\n} from './category/gis';\n\nexport type {GeojsonGeometryInfo} from './category/gis';\n\n// GIS CATEGORY - FLAT GEOJSON\nexport type {\n FlatFeature,\n FlatIndexedGeometry,\n FlatGeometry,\n FlatGeometryType,\n FlatPoint,\n FlatLineString,\n FlatPolygon\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"}
@@ -1,27 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getArrowTypeFromTypedArray = void 0;
4
- const schema_1 = require("../schema/schema");
5
- function getArrowTypeFromTypedArray(array) {
6
- switch (array.constructor) {
7
- case Int8Array:
8
- return new schema_1.Int8();
9
- case Uint8Array:
10
- return new schema_1.Uint8();
11
- case Int16Array:
12
- return new schema_1.Int16();
13
- case Uint16Array:
14
- return new schema_1.Uint16();
15
- case Int32Array:
16
- return new schema_1.Int32();
17
- case Uint32Array:
18
- return new schema_1.Uint32();
19
- case Float32Array:
20
- return new schema_1.Float32();
21
- case Float64Array:
22
- return new schema_1.Float64();
23
- default:
24
- throw new Error('array type not supported');
25
- }
1
+ import { Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8 } from '../schema/schema';
2
+ export function getArrowTypeFromTypedArray(array) {
3
+ switch (array.constructor) {
4
+ case Int8Array:
5
+ return new Int8();
6
+
7
+ case Uint8Array:
8
+ return new Uint8();
9
+
10
+ case Int16Array:
11
+ return new Int16();
12
+
13
+ case Uint16Array:
14
+ return new Uint16();
15
+
16
+ case Int32Array:
17
+ return new Int32();
18
+
19
+ case Uint32Array:
20
+ return new Uint32();
21
+
22
+ case Float32Array:
23
+ return new Float32();
24
+
25
+ case Float64Array:
26
+ return new Float64();
27
+
28
+ default:
29
+ throw new Error('array type not supported');
30
+ }
26
31
  }
27
- exports.getArrowTypeFromTypedArray = getArrowTypeFromTypedArray;
32
+ //# sourceMappingURL=arrow-like-type-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/arrow/arrow-like-type-utils.ts"],"names":["Float32","Float64","Int16","Int32","Int8","Uint16","Uint32","Uint8","getArrowTypeFromTypedArray","array","constructor","Int8Array","Uint8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","Error"],"mappings":"AACA,SAEEA,OAFF,EAGEC,OAHF,EAIEC,KAJF,EAKEC,KALF,EAMEC,IANF,EAOEC,MAPF,EAQEC,MARF,EASEC,KATF,QAUO,kBAVP;AAYA,OAAO,SAASC,0BAAT,CAAoCC,KAApC,EAAiE;AACtE,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAO,IAAIP,IAAJ,EAAP;;AACF,SAAKQ,UAAL;AACE,aAAO,IAAIL,KAAJ,EAAP;;AACF,SAAKM,UAAL;AACE,aAAO,IAAIX,KAAJ,EAAP;;AACF,SAAKY,WAAL;AACE,aAAO,IAAIT,MAAJ,EAAP;;AACF,SAAKU,UAAL;AACE,aAAO,IAAIZ,KAAJ,EAAP;;AACF,SAAKa,WAAL;AACE,aAAO,IAAIV,MAAJ,EAAP;;AACF,SAAKW,YAAL;AACE,aAAO,IAAIjB,OAAJ,EAAP;;AACF,SAAKkB,YAAL;AACE,aAAO,IAAIjB,OAAJ,EAAP;;AACF;AACE,YAAM,IAAIkB,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 +1,6 @@
1
+ import type { TypedArray } from '../../types';
2
+ import { DataType } from 'apache-arrow/Arrow.dom';
3
+ import { AbstractVector } from 'apache-arrow/vector';
4
+ export declare function getArrowType(array: TypedArray): DataType;
5
+ export declare function getArrowVector(array: TypedArray): AbstractVector;
1
6
  //# sourceMappingURL=arrow-type-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-type-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/arrow/arrow-type-utils.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"arrow-type-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/arrow/arrow-type-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,QAAQ,EAiBT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,CAqBxD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAqBhE"}
@@ -1,70 +1,62 @@
1
- "use strict";
2
- /*
3
- import type {TypedArray} from '../../types.js';
4
- import {
5
- DataType,
6
- Float32,
7
- Float64,
8
- Int16,
9
- Int32,
10
- Int8,
11
- Uint16,
12
- Uint32,
13
- Uint8,
14
- Int8Vector,
15
- Uint8Vector,
16
- Int16Vector,
17
- Uint16Vector,
18
- Int32Vector,
19
- Uint32Vector,
20
- Float32Vector,
21
- Float64Vector
22
- } from 'apache-arrow/Arrow.dom';
23
- import {AbstractVector} from 'apache-arrow/vector';
24
-
25
- export function getArrowType(array: TypedArray): DataType {
1
+ import { Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8, Int8Vector, Uint8Vector, Int16Vector, Uint16Vector, Int32Vector, Uint32Vector, Float32Vector, Float64Vector } from 'apache-arrow/Arrow.dom';
2
+ export function getArrowType(array) {
26
3
  switch (array.constructor) {
27
4
  case Int8Array:
28
5
  return new Int8();
6
+
29
7
  case Uint8Array:
30
8
  return new Uint8();
9
+
31
10
  case Int16Array:
32
11
  return new Int16();
12
+
33
13
  case Uint16Array:
34
14
  return new Uint16();
15
+
35
16
  case Int32Array:
36
17
  return new Int32();
18
+
37
19
  case Uint32Array:
38
20
  return new Uint32();
21
+
39
22
  case Float32Array:
40
23
  return new Float32();
24
+
41
25
  case Float64Array:
42
26
  return new Float64();
27
+
43
28
  default:
44
29
  throw new Error('array type not supported');
45
30
  }
46
31
  }
47
-
48
- export function getArrowVector(array: TypedArray): AbstractVector {
32
+ export function getArrowVector(array) {
49
33
  switch (array.constructor) {
50
34
  case Int8Array:
51
35
  return Int8Vector.from(array);
36
+
52
37
  case Uint8Array:
53
38
  return Uint8Vector.from(array);
39
+
54
40
  case Int16Array:
55
41
  return Int16Vector.from(array);
42
+
56
43
  case Uint16Array:
57
44
  return Uint16Vector.from(array);
45
+
58
46
  case Int32Array:
59
47
  return Int32Vector.from(array);
48
+
60
49
  case Uint32Array:
61
50
  return Uint32Vector.from(array);
51
+
62
52
  case Float32Array:
63
53
  return Float32Vector.from(array);
54
+
64
55
  case Float64Array:
65
56
  return Float64Vector.from(array);
57
+
66
58
  default:
67
59
  throw new Error('array type not supported');
68
60
  }
69
61
  }
70
- */
62
+ //# sourceMappingURL=arrow-type-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/arrow/arrow-type-utils.ts"],"names":["Float32","Float64","Int16","Int32","Int8","Uint16","Uint32","Uint8","Int8Vector","Uint8Vector","Int16Vector","Uint16Vector","Int32Vector","Uint32Vector","Float32Vector","Float64Vector","getArrowType","array","constructor","Int8Array","Uint8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","Error","getArrowVector","from"],"mappings":"AACA,SAEEA,OAFF,EAGEC,OAHF,EAIEC,KAJF,EAKEC,KALF,EAMEC,IANF,EAOEC,MAPF,EAQEC,MARF,EASEC,KATF,EAUEC,UAVF,EAWEC,WAXF,EAYEC,WAZF,EAaEC,YAbF,EAcEC,WAdF,EAeEC,YAfF,EAgBEC,aAhBF,EAiBEC,aAjBF,QAkBO,wBAlBP;AAqBA,OAAO,SAASC,YAAT,CAAsBC,KAAtB,EAAmD;AACxD,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAO,IAAIf,IAAJ,EAAP;;AACF,SAAKgB,UAAL;AACE,aAAO,IAAIb,KAAJ,EAAP;;AACF,SAAKc,UAAL;AACE,aAAO,IAAInB,KAAJ,EAAP;;AACF,SAAKoB,WAAL;AACE,aAAO,IAAIjB,MAAJ,EAAP;;AACF,SAAKkB,UAAL;AACE,aAAO,IAAIpB,KAAJ,EAAP;;AACF,SAAKqB,WAAL;AACE,aAAO,IAAIlB,MAAJ,EAAP;;AACF,SAAKmB,YAAL;AACE,aAAO,IAAIzB,OAAJ,EAAP;;AACF,SAAK0B,YAAL;AACE,aAAO,IAAIzB,OAAJ,EAAP;;AACF;AACE,YAAM,IAAI0B,KAAJ,CAAU,0BAAV,CAAN;AAlBJ;AAoBD;AAED,OAAO,SAASC,cAAT,CAAwBX,KAAxB,EAA2D;AAChE,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAOX,UAAU,CAACqB,IAAX,CAAgBZ,KAAhB,CAAP;;AACF,SAAKG,UAAL;AACE,aAAOX,WAAW,CAACoB,IAAZ,CAAiBZ,KAAjB,CAAP;;AACF,SAAKI,UAAL;AACE,aAAOX,WAAW,CAACmB,IAAZ,CAAiBZ,KAAjB,CAAP;;AACF,SAAKK,WAAL;AACE,aAAOX,YAAY,CAACkB,IAAb,CAAkBZ,KAAlB,CAAP;;AACF,SAAKM,UAAL;AACE,aAAOX,WAAW,CAACiB,IAAZ,CAAiBZ,KAAjB,CAAP;;AACF,SAAKO,WAAL;AACE,aAAOX,YAAY,CAACgB,IAAb,CAAkBZ,KAAlB,CAAP;;AACF,SAAKQ,YAAL;AACE,aAAOX,aAAa,CAACe,IAAd,CAAmBZ,KAAnB,CAAP;;AACF,SAAKS,YAAL;AACE,aAAOX,aAAa,CAACc,IAAd,CAAmBZ,KAAnB,CAAP;;AACF;AACE,YAAM,IAAIU,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 Int8Vector,\n Uint8Vector,\n Int16Vector,\n Uint16Vector,\n Int32Vector,\n Uint32Vector,\n Float32Vector,\n Float64Vector\n} from 'apache-arrow/Arrow.dom';\nimport {AbstractVector} from 'apache-arrow/vector';\n\nexport function getArrowType(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\nexport function getArrowVector(array: TypedArray): AbstractVector {\n switch (array.constructor) {\n case Int8Array:\n return Int8Vector.from(array);\n case Uint8Array:\n return Uint8Vector.from(array);\n case Int16Array:\n return Int16Vector.from(array);\n case Uint16Array:\n return Uint16Vector.from(array);\n case Int32Array:\n return Int32Vector.from(array);\n case Uint32Array:\n return Uint32Vector.from(array);\n case Float32Array:\n return Float32Vector.from(array);\n case Float64Array:\n return Float64Vector.from(array);\n default:\n throw new Error('array type not supported');\n }\n}\n"],"file":"arrow-type-utils.js"}
@@ -1,28 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTypeInfo = void 0;
4
- const schema_1 = require("../schema/schema");
5
- /**
6
- * Gets type information from an Arrow type object or "mock" Arrow type object
7
- * @param arrowTypeLike Arrow Type or type object of similar shape
8
- */
9
- function getTypeInfo(arrowTypeLike) {
10
- return {
11
- typeId: arrowTypeLike.typeId,
12
- ArrayType: arrowTypeLike.ArrayType,
13
- typeName: arrowTypeLike.toString(),
14
- typeEnumName: getTypeKey(arrowTypeLike.typeId),
15
- precision: arrowTypeLike.precision
16
- };
1
+ import { Type } from '../schema/schema';
2
+ export function getTypeInfo(arrowTypeLike) {
3
+ return {
4
+ typeId: arrowTypeLike.typeId,
5
+ ArrayType: arrowTypeLike.ArrayType,
6
+ typeName: arrowTypeLike.toString(),
7
+ typeEnumName: getTypeKey(arrowTypeLike.typeId),
8
+ precision: arrowTypeLike.precision
9
+ };
17
10
  }
18
- exports.getTypeInfo = getTypeInfo;
19
11
  let ReverseType = null;
12
+
20
13
  function getTypeKey(typeKey) {
21
- if (!ReverseType) {
22
- ReverseType = {};
23
- for (const key in schema_1.Type) {
24
- ReverseType[schema_1.Type[key]] = key;
25
- }
14
+ if (!ReverseType) {
15
+ ReverseType = {};
16
+
17
+ for (const key in Type) {
18
+ ReverseType[Type[key]] = key;
26
19
  }
27
- return ReverseType[typeKey];
20
+ }
21
+
22
+ return ReverseType[typeKey];
28
23
  }
24
+ //# sourceMappingURL=get-type-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/arrow/get-type-info.ts"],"names":["Type","getTypeInfo","arrowTypeLike","typeId","ArrayType","typeName","toString","typeEnumName","getTypeKey","precision","ReverseType","typeKey","key"],"mappings":"AAAA,SAAQA,IAAR,QAAmB,kBAAnB;AAOA,OAAO,SAASC,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,IAAkBZ,IAAlB,EAAwB;AACtBU,MAAAA,WAAW,CAACV,IAAI,CAACY,GAAD,CAAL,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"}
@@ -1,58 +1,74 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
2
  const DEFAULT_ROW_COUNT = 100;
4
- class RowTableBatchAggregator {
5
- constructor(schema, options) {
6
- this.length = 0;
7
- this.rows = null;
8
- this.cursor = 0;
9
- this._headers = [];
10
- this.options = options;
11
- this.schema = schema;
12
- // schema is an array if there're no headers
13
- // object if there are headers
14
- if (!Array.isArray(schema)) {
15
- this._headers = [];
16
- for (const key in schema) {
17
- this._headers[schema[key].index] = schema[key].name;
18
- }
19
- }
3
+ export default class RowTableBatchAggregator {
4
+ constructor(schema, options) {
5
+ _defineProperty(this, "schema", void 0);
6
+
7
+ _defineProperty(this, "options", void 0);
8
+
9
+ _defineProperty(this, "length", 0);
10
+
11
+ _defineProperty(this, "rows", null);
12
+
13
+ _defineProperty(this, "cursor", 0);
14
+
15
+ _defineProperty(this, "_headers", []);
16
+
17
+ this.options = options;
18
+ this.schema = schema;
19
+
20
+ if (!Array.isArray(schema)) {
21
+ this._headers = [];
22
+
23
+ for (const key in schema) {
24
+ this._headers[schema[key].index] = schema[key].name;
25
+ }
20
26
  }
21
- rowCount() {
22
- return this.length;
27
+ }
28
+
29
+ rowCount() {
30
+ return this.length;
31
+ }
32
+
33
+ addArrayRow(row, cursor) {
34
+ if (Number.isFinite(cursor)) {
35
+ this.cursor = cursor;
23
36
  }
24
- addArrayRow(row, cursor) {
25
- if (Number.isFinite(cursor)) {
26
- this.cursor = cursor;
27
- }
28
- this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
29
- this.rows[this.length] = row;
30
- this.length++;
37
+
38
+ this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
39
+ this.rows[this.length] = row;
40
+ this.length++;
41
+ }
42
+
43
+ addObjectRow(row, cursor) {
44
+ if (Number.isFinite(cursor)) {
45
+ this.cursor = cursor;
31
46
  }
32
- addObjectRow(row, cursor) {
33
- if (Number.isFinite(cursor)) {
34
- this.cursor = cursor;
35
- }
36
- this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
37
- this.rows[this.length] = row;
38
- this.length++;
39
- }
40
- getBatch() {
41
- let rows = this.rows;
42
- if (!rows) {
43
- return null;
44
- }
45
- rows = rows.slice(0, this.length);
46
- this.rows = null;
47
- const batch = {
48
- shape: this.options.shape,
49
- batchType: 'data',
50
- data: rows,
51
- length: this.length,
52
- schema: this.schema,
53
- cursor: this.cursor
54
- };
55
- return batch;
47
+
48
+ this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
49
+ this.rows[this.length] = row;
50
+ this.length++;
51
+ }
52
+
53
+ getBatch() {
54
+ let rows = this.rows;
55
+
56
+ if (!rows) {
57
+ return null;
56
58
  }
59
+
60
+ rows = rows.slice(0, this.length);
61
+ this.rows = null;
62
+ const batch = {
63
+ shape: this.options.shape,
64
+ batchType: 'data',
65
+ data: rows,
66
+ length: this.length,
67
+ schema: this.schema,
68
+ cursor: this.cursor
69
+ };
70
+ return batch;
71
+ }
72
+
57
73
  }
58
- exports.default = RowTableBatchAggregator;
74
+ //# sourceMappingURL=base-table-batch-aggregator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/batches/base-table-batch-aggregator.ts"],"names":["DEFAULT_ROW_COUNT","RowTableBatchAggregator","constructor","schema","options","Array","isArray","_headers","key","index","name","rowCount","length","addArrayRow","row","cursor","Number","isFinite","rows","addObjectRow","getBatch","slice","batch","shape","batchType","data"],"mappings":";AAIA,MAAMA,iBAAiB,GAAG,GAA1B;AAEA,eAAe,MAAMC,uBAAN,CAA8D;AAS3EC,EAAAA,WAAW,CAACC,MAAD,EAAiBC,OAAjB,EAA6C;AAAA;;AAAA;;AAAA,oCALvC,CAKuC;;AAAA,kCAJnC,IAImC;;AAAA,oCAHvC,CAGuC;;AAAA,sCAF3B,EAE2B;;AACtD,SAAKA,OAAL,GAAeA,OAAf;AACA,SAAKD,MAAL,GAAcA,MAAd;;AAIA,QAAI,CAACE,KAAK,CAACC,OAAN,CAAcH,MAAd,CAAL,EAA4B;AAC1B,WAAKI,QAAL,GAAgB,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AAAA,IAAI,EAAEP,IAHkB;AAIxBN,MAAAA,MAAM,EAAE,KAAKA,MAJW;AAKxBT,MAAAA,MAAM,EAAE,KAAKA,MALW;AAMxBY,MAAAA,MAAM,EAAE,KAAKA;AANW,KAA1B;AASA,WAAOO,KAAP;AACD;;AAlE0E","sourcesContent":["import type {Schema} from '../schema/schema';\nimport type {TableBatch} from '../../category/table/table-types';\nimport {TableBatchAggregator, TableBatchOptions} from './table-batch-aggregator';\n\nconst DEFAULT_ROW_COUNT = 100;\n\nexport default class RowTableBatchAggregator implements TableBatchAggregator {\n schema: Schema;\n options: TableBatchOptions;\n\n length: number = 0;\n rows: any[] | null = null;\n cursor: number = 0;\n private _headers: string[] = [];\n\n constructor(schema: Schema, options: TableBatchOptions) {\n this.options = options;\n this.schema = schema;\n\n // schema is an array if there're no headers\n // object if there are headers\n if (!Array.isArray(schema)) {\n this._headers = [];\n for (const key in schema) {\n this._headers[schema[key].index] = schema[key].name;\n }\n }\n }\n\n rowCount(): number {\n return this.length;\n }\n\n addArrayRow(row: any[], cursor?: number): void {\n if (Number.isFinite(cursor)) {\n this.cursor = cursor as number;\n }\n\n this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);\n this.rows[this.length] = row;\n this.length++;\n }\n\n addObjectRow(row: {[columnName: string]: any}, cursor?: number): void {\n if (Number.isFinite(cursor)) {\n this.cursor = cursor as number;\n }\n\n this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);\n this.rows[this.length] = row;\n this.length++;\n }\n\n getBatch(): TableBatch | null {\n let rows = this.rows;\n if (!rows) {\n return null;\n }\n\n rows = rows.slice(0, this.length);\n this.rows = null;\n\n const batch: TableBatch = {\n shape: this.options.shape,\n batchType: 'data',\n data: rows,\n length: this.length,\n schema: this.schema,\n cursor: this.cursor\n };\n\n return batch;\n }\n}\n"],"file":"base-table-batch-aggregator.js"}