mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-02 10:37:05 -06:00
dax: clear NAMEOF's volatile flag, infer Pow as Decimal and widen the scope note (#2228)
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -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 }),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user