Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example stacked bar chart doesn't work with Polars in v5 rc #3003

Closed
braaannigan opened this issue Mar 29, 2023 · 4 comments
Closed

Example stacked bar chart doesn't work with Polars in v5 rc #3003

braaannigan opened this issue Mar 29, 2023 · 4 comments
Labels

Comments

@braaannigan
Copy link

If we try the example stacked bar chart but convert to Polars it doesn't work (I found this with a similar error on my own data):

import altair as alt
from vega_datasets import data
import polars as pl

source = pl.from_pandas(data.seattle_weather())

alt.Chart(source).mark_bar(
    cornerRadiusTopLeft=3,
    cornerRadiusTopRight=3
).encode(
    x='month(date):O',
    y='count():Q',
    color='weather:N'
)

with error message:

thread 'tokio-runtime-worker' panicked at 'assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8', /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs:268:9
thread 'tokio-runtime-worker' panicked at 'assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8', /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs:268:9
thread 'tokio-runtime-worker' panicked at 'assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8thread '', tokio-runtime-worker/root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs' panicked at ':assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8268', :/root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs9:
268:9
thread 'tokio-runtime-worker' panicked at 'assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8', /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs:268:9
thread 'tokio-runtime-worker' panicked at 'assertion failed: `(left == right)`
  left: `LargeUtf8`,
 right: `Utf8`: StringArray expects DataType::Utf8', /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/arrow-array-32.0.0/src/array/byte_array.rs:268:9
@braaannigan braaannigan changed the title Example stacked bar chart doesn't work with Polars is v5 Example stacked bar chart doesn't work with Polars in v5 rc Mar 29, 2023
@jonmmease
Copy link
Contributor

Hi @braaannigan, are you running this example with VegaFusion? It's not in your example. but the stack trace looks like it might be related to VegaFusion.

@braaannigan
Copy link
Author

Hi @jonmmease, yes, sorry that import was elsewhere in the notebook

@jonmmease
Copy link
Contributor

No worries, thanks for taking the time to report it!
Lets move discussion over to vega/vegafusion#286 and close the issue here.

@joelostblom
Copy link
Contributor

Closing in favor of the vegafusion issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants