You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/19 21:13:26 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #2109: Push gather down to Parquet Encoder

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org