vega / vegafusion

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

Support Date32 type with Polars #476

Closed jonmmease closed 6 months ago

jonmmease commented 6 months ago

This PR was motivated by https://github.com/altair-viz/altair/issues/3280. This same PyArrow cropped up when using VegaFusion with a Polars DataFrame containing a Date32 column. This PR adds a simple PyArrowDatasource that bypasses the DataFrame Interchange protocol, and this Date32 error. Then it converts Polars to PyArrow and uses this data source. The Polars docs say this is mostly a zero-cost conversion.