code wiki / _hdl_build / nx_query.nx

nx_query.nx

buildroot/runtime/_hdl_build/nx_query.nx

4536 B108 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_query.nx -- the sovereign QUERY EXECUTOR over a dataset (the "SELECT agg(col) WHERE col op val GROUP BY col" engine, structured-params form -- a string/typed-syntax parser is the thin front-end follow-on). This is what makes the analytics QUERYABLE instead of called function-by-function. Composes nx_dataframe (filter + groupby + reductions). Integer-exact. Works on in-memory columns OR seg_store-loaded columns (via nx_analyst_store). license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_dataframe.nx nx_query.nx nx_query_gate.nx

imports: nx_syscalls.nxnx_dataframe.nx

imported by: nx_query_gate.nx

structs

none

consts

10const Q_COUNT: i64 = 0
11const Q_SUM: i64 = 1
12const Q_AVG: i64 = 2
13const Q_MIN: i64 = 3
14const Q_MAX: i64 = 4
16const Q_ALL: i64 = 5

functions

18func q_match(v: i64, op: i64, thr: i64) -> i64
called by 2: q_scalarq_grouped
30func q_scalar(agg_col: *i64, filter_col: *i64, n: i64, filter_op: i64, filter_thr: i64, agg_kind: i64) -> i64
called by 1: main calls 1: q_match
59func q_grouped(agg_col: *i64, filter_col: *i64, group_col: *i64, n: i64, filter_op: i64, filter_thr: i64, agg_kind: i64, out_keys: *i64, out_agg: *i64, out_cnt: *i64, max_groups: i64) -> i64
called by 1: main calls 1: q_match
101func q_kind_str(k: i64) -> *u8