eval method
Evaluate this expression in the context of row (column name -> value).
Implementation
@override
Object? eval(Map<String, Object?> row) {
if (isAggregate) {
throw StateError(
'Aggregate function $name() cannot be evaluated as a scalar',
);
}
final fn = kScalarFunctions[name];
if (fn == null) {
throw StateError('Unknown function: $name');
}
final values = args.map((a) => a.eval(row)).toList();
return fn(values);
}