@columnar-js/core 0.1.0 → 0.1.1
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/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ I wanted a way to keep the convenience of working with composable data operation
|
|
|
11
11
|
Columnar keeps tabular data in contiguous typed-array buffers, compiles predicates once per execution, and runs filtered aggregations in a fused traversal. It is designed for application workloads that need fast in-process analytics without converting every row into an intermediate object.
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { col, count, mean, sum, table } from '@columnar/core';
|
|
14
|
+
import { col, count, mean, sum, table } from '@columnar-js/core';
|
|
15
15
|
|
|
16
16
|
const vehicles = table({
|
|
17
17
|
timestamp: new Float64Array([0, 10, 20, 30]),
|
|
@@ -56,7 +56,7 @@ The goal isn't to replace hand-written loops. It's to make efficient, composable
|
|
|
56
56
|
## Install
|
|
57
57
|
|
|
58
58
|
```sh
|
|
59
|
-
pnpm add @columnar/core
|
|
59
|
+
pnpm add @columnar-js/core
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Input
|
|
@@ -66,7 +66,7 @@ pnpm add @columnar/core
|
|
|
66
66
|
Use typed arrays for the direct columnar path. Typed-array inputs are retained by reference; the table and caller share their backing buffers.
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
|
-
import { table } from '@columnar/core';
|
|
69
|
+
import { table } from '@columnar-js/core';
|
|
70
70
|
|
|
71
71
|
const dataset = table({
|
|
72
72
|
timestamp: new Float64Array([0, 10, 20]),
|
|
@@ -105,7 +105,7 @@ const fastVehicles = dataset
|
|
|
105
105
|
### Aggregation
|
|
106
106
|
|
|
107
107
|
```ts
|
|
108
|
-
import { count, max, mean, min, sum, variance } from '@columnar/core';
|
|
108
|
+
import { count, max, mean, min, sum, variance } from '@columnar-js/core';
|
|
109
109
|
|
|
110
110
|
const summary = dataset
|
|
111
111
|
.query()
|
|
@@ -141,7 +141,7 @@ Available comparisons: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `isNull`, and `isNo
|
|
|
141
141
|
`aggregateStream` consumes an `AsyncIterable<Table>` one chunk at a time. It retains aggregate state, not prior chunks, and requests the next chunk only after processing the current one.
|
|
142
142
|
|
|
143
143
|
```ts
|
|
144
|
-
import { aggregateStream, count, mean, sum, table } from '@columnar/core';
|
|
144
|
+
import { aggregateStream, count, mean, sum, table } from '@columnar-js/core';
|
|
145
145
|
|
|
146
146
|
async function* readBatches() {
|
|
147
147
|
yield table({ temperature: new Float32Array([21.5, 27.2, 29.1]) });
|
|
@@ -204,7 +204,7 @@ pnpm bench -- --large
|
|
|
204
204
|
|
|
205
205
|
`pnpm check` runs type checking, ESLint, Prettier validation, tests, and the package build. The benchmark compares Columnar's fused query with a hand-written typed-array loop and materializing JavaScript pipelines. The loop is a useful workload-specific reference; Columnar provides the reusable query model around filtering, null handling, aggregation and streaming. Run comparisons on the same machine and Node.js version.
|
|
206
206
|
|
|
207
|
-
Each example can be opened as a StackBlitz project after `@columnar/core` is published to npm.
|
|
207
|
+
Each example can be opened as a StackBlitz project after `@columnar-js/core` is published to npm.
|
|
208
208
|
|
|
209
209
|
## License
|
|
210
210
|
|