tustvold commented on code in PR #2109:
URL: https://github.com/apache/arrow-rs/pull/2109#discussion_r924961846
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -373,48 +373,35 @@ fn write_leaf(
let indices = levels.non_null_indices();
let written = match writer {
ColumnWriter::Int32ColumnWriter(ref mut typed) => {
- let values = match column.data_type() {
+ match column.data_type() {
ArrowDataType::Date64 => {
// If the column is a Date64, we cast it to a Date32, and
then interpret that as Int32
- let array = if let ArrowDataType::Date64 =
column.data_type() {
- let array = arrow::compute::cast(column,
&ArrowDataType::Date32)?;
- arrow::compute::cast(&array, &ArrowDataType::Int32)?
- } else {
- arrow::compute::cast(column, &ArrowDataType::Int32)?
Review Comment:
This if statement was somewhat redundant, I suspect it dates from a refactor
at some point
--
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]