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

DateTime panic when using ndjson #977

Closed
maennchen opened this issue Sep 3, 2024 · 0 comments · Fixed by #981
Closed

DateTime panic when using ndjson #977

maennchen opened this issue Sep 3, 2024 · 0 comments · Fixed by #981

Comments

@maennchen
Copy link
Contributor

Code

[%{now: DateTime.utc_now()}]
|> Explorer.DataFrame.new()
|> Explorer.DataFrame.dump_ndjson!()

Expected

{"now":"2024-09-03T12:33:15.363536Z"}

or

{"now":"2024-09-03T12:33:15.363536+0000"}

Actual

thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-json-0.41.3/src/json/write/serialize.rs:399:13:
Invalid Offset format (must be [-]00:00) or timezones feature not active
                                                                                                                                                                                                                               note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
** (ErlangError) Erlang error: :nif_panicked
    (explorer 0.9.0) Explorer.PolarsBackend.Native.df_dump_ndjson(%Explorer.PolarsBackend.DataFrame{resource: #Reference<0.3392604668.3009806337.151230>})
    (explorer 0.9.0) lib/explorer/polars_backend/data_frame.ex:273: Explorer.PolarsBackend.DataFrame.dump_ndjson/1
    (explorer 0.9.0) lib/explorer/data_frame.ex:1542: Explorer.DataFrame.dump_ndjson!/1
    iex:6: (file)

When using any other dump function (I tried CSV, Arrow and Parquet), it works as expected.

Runtime

  • Elixir 1.17.2
  • Erlang 27.0.1
  • Explorer 0.9.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant