You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nested_case_when (vortex-array/src/expr/exprs.rs) panics on input a caller may not control:
no WHEN/THEN pairs: assert!(!when_then_pairs.is_empty(), ...);
more pairs than fit in u32: vortex_panic!("nested_case_when has too many when/then pairs").
Callers that build a CASE from user or query input (for example a list of branches translated from SQL) have to repeat both checks before calling it, or wrap it to turn the panics into errors.
Proposal: add try_nested_case_when(when_then_pairs, else_value) -> VortexResult<Expression> that returns an error in both cases, and have nested_case_when call it and vortex_expect the result, as the bound_* constructors already do.
Activity