fn parse_expr(
input_exprs: &[Arc<dyn PhysicalExpr>],
input_fields: &[FieldRef],
) -> Result<Arc<dyn PhysicalExpr>>Expand description
When lead/lag is evaluated on a NULL expression we attempt to
refine it by matching it with the type of the default value.
For e.g. in lead(NULL, 1, false) the generic ScalarValue::Null
is refined into ScalarValue::Boolean(None). Only the type is
refined, the expression value remains NULL.
When the window function is evaluated with NULL expression
this guarantees that the type matches with that of the default
value.
For more details see: https://github.com/apache/datafusion/issues/12717