nx_parquet.nx
buildroot/runtime/nx_parquet.nx
about
nx_parquet.nx -- THE PARQUET CLI over nx_parquet_lib (search R0d be_bright: BRIGHT ships as parquet).
usage: nx_parquet meta <file>
nx_parquet count <file>
nx_parquet show <file> <leaf name or index> <n>
nx_parquet tsv <file> <leaf a> <leaf b> <out.tsv>
meta prints the footer as data (schema tree with max levels, row groups, every column chunk's codec, encodings,
counts and offsets) and then WALKS every BYTE_ARRAY column chunk's pages, so what it prints is what the
reader decoded, never what the header claims; the last line is verdict=OK or verdict=REFUSED with a count.
count the decoded entry, present-value and row counts per leaf across all row groups beside the declared rows:
the known-answer test for a dataset card (BRIGHT declares num_examples per split; this must reproduce it).
show the first n entries of one leaf: row, definition level, repetition level, value (a list leaf shows its
elements one per entry with the row they belong to).
tsv two flat leaves as <a>TAB<b> rows (tabs, newlines and carriage returns inside a cell become spaces), written
to <out>.tmp and renamed into place, one row group in memory at a time; rows where either side is null are
COUNTED and skipped, never written as empty strings.
Exit 0 OK, 1 REFUSED (the refusal named on the last line), 2 usage.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_parquet_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 22 | const NP_OK: i64 = 0 |
| 23 | const NP_REFUSED: i64 = 1 |
| 24 | const NP_USAGE: i64 = 2 |
| 25 | const NP_STDOUT: i64 = 1 |
| 26 | const NP_PATH_CAP: i64 = 1024 |
| 27 | const NP_TMP_SUFFIX: *u8 = ".tmp" |
functions
| 29 | func np_slen(s: *u8) -> i64 |
| 34 | func np_atoi(s: *u8) -> i64 |
| 46 | func np_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 55 | func np_leaf_arg(pq: *i64, s: *u8) -> i64 |
| 62 | func np_refusal(w: *i64, pq: *i64, rc: i64) -> i64 |
| 70 | func np_name(w: *i64, pq: *i64, se: *i64) -> i64 |
| 75 | func np_meta(pq: *i64, w: *i64, path: *u8) -> i64 |
| 186 | func np_count(pq: *i64, w: *i64, path: *u8) -> i64 |
| 248 | func np_show(pq: *i64, w: *i64, leaf: i64, n: i64) -> i64 |
| 286 | func np_tsv(pq: *i64, w: *i64, la: i64, lb: i64, out: *u8) -> i64 |
| 309 | func main(argc: i64, argv: *i64) -> i64 |