haruband opened a new issue, #15649: URL: https://github.com/apache/datafusion/issues/15649
### Describe the bug I have encountered an error while copying to Parquet with a partition column that is dictionary-encoded. ``` thread 'tokio-runtime-worker' panicked at datafusion/datasource/src/write/demux.rs:516:31: index out of bounds: the len is 2 but the index is 2 ``` ### To Reproduce ``` RUST_BACKTRACE=1 datafusion-cli > CREATE TABLE test0 AS VALUES ('foo',1), ('bar',2), ('foo',3); > COPY (SELECT arrow_cast(column1, 'Dictionary(Int32, Utf8)') AS column1, column2 FROM test0) TO 'test_files/scratch/copy/part_dict_test' STORED AS PARQUET PARTITIONED BY (column1); thread 'tokio-runtime-worker' panicked at datafusion/datasource/src/write/demux.rs:516:31: index out of bounds: the len is 2 but the index is 2 ... ``` ### Expected behavior ``` +-------+ | count | +-------+ | 3 | +-------+ 1 row(s) fetched. Elapsed 0.028 seconds. ``` ### 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org