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

Support format function with empty format string, make sum of nulls evaluate to zero #414

Closed jonmmease closed 8 months ago

jonmmease commented 8 months ago

Closes #409

Adds support for the format function when the format string argument is the empty string. In this case, numbers are converted to strings such that integer values in float columns are formatted without a decimal point.

While making a test case from the example in #409, I happened upon an unrelated issue. In the Vega aggregate/joinaggregate transforms, the sum aggregation returns zero if it inputs all null values. In SQL it returns null. I added a coalesce to replace these nulls with zeros.