dax: clear NAMEOF's volatile flag, infer Pow as Decimal and widen the scope note (#2228)

This commit is contained in:
alosslessdev
2026-11-05 11:36:02 -05:00
parent 10a2c02378
commit c040089f8d
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -851,7 +851,7 @@ pub static FUNCTIONS: &[FunctionSpec] = &[
overload(&[ParamKind::Reference, ParamKind::Text, ParamKind::Text]),
],
ReturnType::String,
FunctionFlags::new(false, true, false, false, true),
FunctionFlags::new(false, false, false, false, true),
"Text name of a table, column, measure or calendar. Component selects TABLE, COLUMN, \
MEASURE, CALENDAR, FULL, SELF or PARENT; Escaped selects ESCAPED, UNESCAPED or \
MINIMALLYESCAPED. Variables and dynamic expressions are not accepted.",
+3 -1
View File
@@ -560,7 +560,9 @@ fn blank_arithmetic(op: BinaryOp, left: InferredType, right: InferredType) -> Re
Ok(InferredType::Unknown)
}
}
BinaryOp::Pow => Ok(InferredType::Blank),
// The evaluator coerces a BLANK operand to 0 and answers a number, so exponentiation is
// Decimal rather than Blank.
BinaryOp::Pow => Ok(InferredType::Data(DataType::Decimal)),
_ => Err(TypeError::IncompatibleOperands { op, left, right }),
}
}
+8 -7
View File
@@ -33,13 +33,14 @@ The per-category counts below are the catalog's. This crate links no evaluator f
## Evaluated functions
In this crate only the scalar core listed in `crates/dax/README.md` has an evaluator path: the
aggregations and their `*X` iterators, the logical spine, `CALCULATE`/`FILTER`/`ALL*`/`VALUES`/
`DISTINCT`/`SELECTEDVALUE`, `RELATED*`, `COUNTROWS` and the text/math helpers the core switch
carries. Every other catalogued function reports "not implemented" until its evaluator family is
linked (`eval::FAMILIES` is empty here); each family PR adds its dispatch and its own suite under
`crates/dax/tests/`. The lists below are therefore the **catalog**, not a claim that this build
evaluates them.
In this crate the evaluator is `Evaluator::eval`'s built-in switch plus whatever `eval::FAMILIES`
links, and `FAMILIES` is empty here. The switch handles the aggregations and their `*X` iterators,
the logical spine, `CALCULATE`/`FILTER`/`ALL*`/`VALUES`/`DISTINCT`/`SELECTEDVALUE`, `RELATED*`,
`COUNTROWS`, the statement operators, and the scalar helpers it carries directly — `ABS`, `DATE`,
`LEN`, `PATHLENGTH` and the rest of the small scalar set in `crates/dax/src/eval.rs`. Every other
catalogued function reports "not implemented" until its evaluator family is linked; each family PR
adds its dispatch and its own suite under `crates/dax/tests/`. The lists below are therefore the
**catalog**, not a claim that this build evaluates every name in it.
## Catalogued (parsed and validated)