TheBuilderJR opened a new issue, #14736:
URL: https://github.com/apache/datafusion/issues/14736
### Describe the bug
The following code
```
df
.clone()
.write_parquet(
file_path.to_str().ok_or(anyhow!("Invalid file path"))?,
datafusion::dataframe::DataFrameWriteOptions
::default()
.with_single_file_output(true)
.with_sort_by(vec![col("timestamp_utc").sort(true,
true)]),
None
).await?;
```
results in the following panic
```
thread 'tokio-runtime-worker' panicked at
/Users/bobren/projects/arrow-rs/parquet/src/arrow/arrow_writer/byte_array.rs:462:9:
internal error: entered unreachable code: cannot downcast
Timestamp(Millisecond, Some("UTC")) to byte array
stack backtrace:
0: rust_begin_unwind
at
/rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at
/rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e/library/core/src/panicking.rs:74:14
2: <parquet::arrow::arrow_writer::byte_array::ByteArrayEncoder as
parquet::column::writer::encoder::ColumnValueEncoder>::write_gather
at
/Users/bobren/projects/arrow-rs/parquet/src/arrow/arrow_writer/byte_array.rs:90:18
3: parquet::column::writer::GenericColumnWriter<E>::write_mini_batch
at
/Users/bobren/projects/arrow-rs/parquet/src/column/writer/mod.rs:703:17
4: parquet::column::writer::GenericColumnWriter<E>::write_batch_internal
at
/Users/bobren/projects/arrow-rs/parquet/src/column/writer/mod.rs:483:30
5: parquet::arrow::arrow_writer::write_primitive
at
/Users/bobren/projects/arrow-rs/parquet/src/arrow/arrow_writer/mod.rs:970:5
6: parquet::arrow::arrow_writer::ArrowColumnWriter::write
at
/Users/bobren/projects/arrow-rs/parquet/src/arrow/arrow_writer/mod.rs:631:17
7:
datafusion::datasource::file_format::parquet::column_serializer_task::{{closure}}
```
### To Reproduce
Use the above code to write a parquet file
### Expected behavior
No panic when writing parquet file
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]