code wiki / (root) / nx_parquet.nx

nx_parquet.nx

buildroot/runtime/nx_parquet.nx

14649 B357 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_parquet_lib.nx nx_parquet.nx

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

main wb_new sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ wb_puts wb_byte wb_flush sys_write ↻ wb_byte ↻ wb_flush ↻ sys_exit ↻ sys_mmap ↻ pq_open sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close pq_le32 pq_parse_footer tc_init tc_field tc_byte tc_zz

structs

none

consts

22const NP_OK: i64 = 0
23const NP_REFUSED: i64 = 1
24const NP_USAGE: i64 = 2
25const NP_STDOUT: i64 = 1
26const NP_PATH_CAP: i64 = 1024
27const NP_TMP_SUFFIX: *u8 = ".tmp"

functions

29func np_slen(s: *u8) -> i64
34func np_atoi(s: *u8) -> i64
called by 2: np_leaf_argmain
46func np_streq(a: *u8, b: *u8) -> i64
called by 1: main
55func np_leaf_arg(pq: *i64, s: *u8) -> i64
called by 1: main calls 2: pq_leaf_namednp_atoi
62func np_refusal(w: *i64, pq: *i64, rc: i64) -> i64
70func np_name(w: *i64, pq: *i64, se: *i64) -> i64
called by 2: np_metanp_count calls 1: wb_bytes
75func np_meta(pq: *i64, w: *i64, path: *u8) -> i64
186func np_count(pq: *i64, w: *i64, path: *u8) -> i64
248func np_show(pq: *i64, w: *i64, leaf: i64, n: i64) -> i64
286func np_tsv(pq: *i64, w: *i64, la: i64, lb: i64, out: *u8) -> i64
309func main(argc: i64, argv: *i64) -> i64