vega / vegafusion

Serverside scaling for Vega and Altair visualizations
https://vegafusion.io
BSD 3-Clause "New" or "Revised" License
303 stars 15 forks source link

Fix crash in bin transform with empty input table #395

Closed jonmmease closed 9 months ago

jonmmease commented 9 months ago

When a transform pipeline that involves extent and bin was fed an empty table as input, the following error would occur.

Internal error: Cannot convert NULL to f64

The issue is that extent returns [NULL, NULL] in this case (which is valid) and bin would attempt to cast these elements to f64 values (which is not valid). Now we default to [0.0, 0.0] in this case (any valid values would work since the result will be an empty table).