Typed columnar DataFrames with homoiconic filter/join/group-agg pipelines, Arrow IPC framing, and Zstd columnar zone-map snapshots.
Pure-Veko typed columnar DataFrame engine, homoiconic relational/analytical query verbs, binary Arrow-style IPC (VKAR), and Zstd-compressed Parquet-lite columnar storage (VKZP) with zone-map predicate pushdown.
dataframe_parquet brings zero-dependency in-memory analytics and compressed columnar storage to Veko across VM, Wasm 3.0, and Native targets:
dataframe_parquet/core: Typed Column buffers (.i64_col, .f64_col, .bool_col, and dictionary-encoded .str_col) paired with 1-bit-per-row validity null bitmaps, schema inference, and homoiconic row expression evaluation.dataframe_parquet/arrow: Binary columnar IPC framing (encode-ipc, decode-ipc) with IEEE CRC-32 verification, plus a Zstd-compressed Parquet-lite row-group container (write-columnar-zstd, read-columnar-zstd) featuring leading/trailing 'VKZP' magic headers, Zstd-compressed schema footer, per-column (min, max, null_count) zone-map statistics for zero-decompression row-group pruning, per-chunk CRC-32 checksums, and whole-file SHA-256 integrity.dataframe_parquet: Pipe-friendly (\) relational and analytical verbs (select-cols, drop-cols, filter-rows, with-col, sort-by, limit-rows, inner-join, left-join, group-agg, describe, format-table) plus RFC 4180 CSV and JSONL codecs (from-csv, to-csv, to-jsonl).veko pkg add dataframe_parquet@1.0.0Import the facade and columnar codec module:
use [
df = dataframe_parquet
arrow = dataframe_parquet/arrow
].str_col) automatically deduplicate unique UTF-8 values into str_dict and store compact integer codes per row, while missing .null values across all column types occupy 1 bit per row in a validity byte bitmap.filter-rows, with-col, and group-agg accept native Veko quote [...] code blocks directly alongside first-class closures, evaluating compound predicates (quote [amount > 100 and status == 'paid']) and named aggregations (quote [total = sum amount, orders = count id, avg_amt = avg amount, top = max amount]) with zero code generation.write-columnar-zstd partitions rows into configurable row groups, recording (min, max, null_count) zone maps per column chunk before compressing with RFC 8878 Zstandard (compress/zstd). On read, read-columnar-zstd/where verifies the 32-byte SHA-256 container digest in constant time (bits/ct-eq?) and skips entire row groups whose [min, max] bounds cannot satisfy the predicate without decompressing their Zstd column pages.dataframe_parquet| Type / Signature | Description |
|---|---|
col-from-values = fn [name str, kind enum, vals block] Column | Constructs a typed .i64_col, .f64_col, .bool_col, or dictionary-encoded .str_col. |
infer-col = fn [name str, vals block] Column | Infers column type from non-.null values. |
from-columns = fn [cols block[Column]] DataFrame | Builds a DataFrame from equal-length Columns. |
from-rows = fn [rows block] DataFrame / to-rows = fn [df DataFrame] block[map] | Converts between row maps and columnar DataFrames. |
row-count = fn [df DataFrame] i64 / col-names = fn [df DataFrame] block[str] / schema = fn [df DataFrame] block[map] | Inspects row count, column order, and column schema metadata. |
describe = fn [df DataFrame] DataFrame | Computes count, nulls, min, max, and mean across all columns. |
format-table = fn [df DataFrame /max_rows max_rows i64 = 50] str | Renders an aligned ASCII box table. |
select-cols = fn [df DataFrame, names block] DataFrame / drop-cols = fn [df DataFrame, names block] DataFrame | Projects or removes columns (['a' 'b'] or quote [a b]). |
filter-rows = fn [df DataFrame, pred any] DataFrame | Filters rows via closure fn [row map] bool or homoiconic quote [...] expression. |
with-col = fn [df DataFrame, col_name str, compute any] DataFrame | Appends or replaces a computed column via closure or quote [...] arithmetic expression. |
sort-by = fn [df DataFrame, col_name any /desc descending bool = false] DataFrame | Stably sorts rows by col_name (.null last). |
limit-rows = fn [df DataFrame, n i64 /offset offset i64 = 0] DataFrame | Slices up to n rows starting at offset. |
inner-join = fn [left DataFrame, right DataFrame, left_on str, right_on str] DataFrame | Hash-based inner equi-join. |
left-join = fn [left DataFrame, right DataFrame, left_on str, right_on str] DataFrame | Hash-based left outer equi-join filling unmatched right columns with .null. |
group-agg = fn [df DataFrame, group_cols block, aggs block] DataFrame | Groups by group_cols and evaluates sum, count, avg, min, max aggregations. |
from-csv = fn [csv_text str] DataFrame / to-csv = fn [df DataFrame] str / to-jsonl = fn [df DataFrame] str | RFC 4180 CSV and JSON Lines import/export. |
dataframe_parquet/arrow| Signature | Description |
|---|---|
encode-ipc = fn [df DataFrame] bytes / decode-ipc = fn [raw bytes] DataFrame | Encodes and decodes CRC32-verified Arrow-style binary columnar IPC frames (VKAR). |
write-columnar-zstd = fn [df DataFrame, path str /row_group_size rg_size i64 = 1024] enum | Writes a Zstd-compressed Parquet-lite columnar file (VKZP) with zone maps and SHA-256 trailer. |
read-columnar-zstd = fn [path str /where pred block = []] DataFrame | Reads a VKZP file with optional homoiconic zone-map predicate pushdown. |
read-columnar-zstd-stats = fn [path str /where pred block = []] map | Reads a VKZP file and returns { df, total_row_groups, scanned_row_groups, skipped_row_groups }. |
inspect-zone-maps = fn [path str] map | Reads and verifies the schema + per-row-group zone-map footer without decompressing column chunks. |
use [df = dataframe_parquet]
sales = df/from-rows [
{ id = 1, region = 'eu-west', amount = 450, status = 'paid' }
{ id = 2, region = 'us-east', amount = 280, status = 'paid' }
{ id = 3, region = 'eu-west', amount = 80, status = 'refunded' }
]
summary = sales
\ df/filter-rows (quote [amount > 100 and status == 'paid'])
\ df/group-agg (quote [region]) (quote [total = sum amount, orders = count id, avg_amt = avg amount, top = max amount])
\ df/sort-by/desc 'total' true
println (df/format-table summary)veko check packages/dataframe_parquet/src/core.vk
veko check packages/dataframe_parquet/src/arrow.vk
veko check packages/dataframe_parquet/src/mod.vk
veko check packages/dataframe_parquet/examples/demo.vk
veko run -C all packages/dataframe_parquet/examples/demo.vkhttps://veko-lang.org/pkg/dataframe_parquet/1.0.0.vkp01e7827c13ba45f8e1a67f22fa0a46a6ab08abb9165f975f6631d0ef1e1a79efd36dff8bf05f474debd0f477589bf3a2c8433871f3617442bc4d248274c80380ed25519:27406074d8681da1d4e6420f5d887cac15c313334c249ac047ba9d4e2df72b70{"name":"dataframe_parquet","version":"1.0.0","tier":3.0,"tier_label":"Tier 3: AI, Vector RAG & DataFrames","category":"Columnar DataFrames & Arrow","description":"Typed columnar DataFrames with homoiconic filter/join/group-agg pipelines, Arrow IPC framing, and Zstd columnar zone-map snapshots.","modules":["dataframe_parquet/arrow","dataframe_parquet/core","dataframe_parquet"],"homepage":"https://veko-lang.org/packages/dataframe_parquet"}| Bundle Entry Path | Size | Leaf SHA-256 Digest |
|---|---|---|
| README.md | 6 KB | dd4eba98115ff83743d062c62b5a3dc5f3e9a1879b2f11c4670423fd94a2041f |
| arrow.vk | 19 KB | 9a0003a59585ef3a43334e2fc91916cc4abc514728118274b1eee0a40b0d2c0a |
| core.vk | 13 KB | cd6fab17e5c321e5777fd124c43688cda151a497668d44c8a2461cb169413032 |
| examples/demo.vk | 6 KB | a8cd4b8fbbdf9f154355713bddda255f374eb10e6d0fc4b3da82a20639d59386 |
| mod.vk | 18 KB | 2cf80f2e920f2e6ed9382dd71f694b9ac95f63325a5403fef94907ea09b08726 |