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
{{ message }}
Repository navigation
make_date, make_timestamp(_ltz), add_months and months_between return the first row's result for every row when an argument is a literal #7712
Expected: [2021-01-01, 2020-06-01, 2019-12-01], [2021-02-28, 2020-07-15, 2020-01-01] and one value per row. With column arguments instead of literals (e.g. col("y") * 0 + 1 for the day) the results are correct.
The same happens for make_timestamp and make_timestamp_ltz (e.g. F.make_timestamp(col("y"), col("m"), lit(1), lit(0), lit(0), lit(0.0))).
Cause: the kernels combine their arguments with Iterator::zip (make_date, make_timestamp and make_timestamp_ltz in the same file, add_months and months_between in date_arithmetic.rs). A literal argument arrives as a length-1 series, so zip stops after the first row. The length-1 result is then broadcast to every row.
Suggested fix: broadcast every argument to the common length first (or reject mismatched lengths), as the other multi-argument kernels do.
Activity