Expand description
Shared tidy dispatch: maps CJC language method calls on TidyView / GroupedTidyView values to the concrete cjc_data API.
Both cjc-eval and cjc-mir-exec call into dispatch_tidy_method and
dispatch_grouped_method so that every tidy operation has a single source
of truth. The executors only need to pattern-match Value::TidyView or
Value::GroupedTidyView and delegate here.
§Error handling
All errors are returned as Err(String). The caller wraps the string
into its own error type (EvalError / MirExecError).
Functions§
- build_
arrange_ key - Build an ArrangeKey struct value.
- build_
binop_ expr - Build a DExpr binary operation.
- build_
col_ expr - Build a
Value::Struct { name: "DExpr", kind: "col", ... }from a column name. - build_
tidy_ agg - Build a TidyAgg struct value.
- dataframe_
to_ value - Convert a
DataFrameto the legacyValue::Struct { name: "DataFrame" }representation used by existing CJC code. - dispatch_
grouped_ method - Dispatch a method call on a
Value::GroupedTidyView. - dispatch_
tidy_ builtin - Dispatch builder builtins like
col(),desc(),asc(),sum(),mean(), etc. ReturnsOk(Some(value))if recognised,Ok(None)otherwise. - dispatch_
tidy_ method - Dispatch a method call on a
Value::TidyView. - value_
to_ dexpr - Parse a
Value::Struct { name: "DExpr", ... }into aDExpr. - wrap_
grouped - Wrap a
GroupedTidyViewintoValue::GroupedTidyView. - wrap_
view - Wrap a
TidyViewintoValue::TidyView.