You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2024/03/18 08:01:41 UTC

Re: [PR] Update Arrow 51.0.0 [arrow-datafusion]

tustvold commented on code in PR #9613:
URL: https://github.com/apache/arrow-datafusion/pull/9613#discussion_r1528021669


##########
datafusion/functions/src/datetime/date_part.rs:
##########
@@ -157,28 +114,28 @@ impl ScalarUDFImpl for DatePartFunc {
             ColumnarValue::Scalar(scalar) => scalar.to_array()?,
         };
 
-        let arr = match date_part.to_lowercase().as_str() {
-            "year" => extract_date_part!(&array, temporal::year),
-            "quarter" => extract_date_part!(&array, temporal::quarter),
-            "month" => extract_date_part!(&array, temporal::month),
-            "week" => extract_date_part!(&array, temporal::week),
-            "day" => extract_date_part!(&array, temporal::day),
-            "doy" => extract_date_part!(&array, temporal::doy),
-            "dow" => extract_date_part!(&array, temporal::num_days_from_sunday),
-            "hour" => extract_date_part!(&array, temporal::hour),
-            "minute" => extract_date_part!(&array, temporal::minute),
-            "second" => extract_date_part!(&array, seconds),
-            "millisecond" => extract_date_part!(&array, millis),
-            "microsecond" => extract_date_part!(&array, micros),
-            "nanosecond" => extract_date_part!(&array, nanos),
-            "epoch" => extract_date_part!(&array, epoch),
-            _ => exec_err!("Date part '{date_part}' not supported"),
-        }?;
+        let arr = match part.to_lowercase().as_str() {

Review Comment:
   https://github.com/apache/arrow-rs/pull/5318



##########
datafusion-examples/examples/deserialize_to_struct.rs:
##########
@@ -15,61 +15,61 @@
 // specific language governing permissions and limitations
 // under the License.
 
+use arrow::array::AsArray;
+use arrow::datatypes::{Float64Type, Int32Type};
 use datafusion::error::Result;
 use datafusion::prelude::*;
-use serde::Deserialize;
+use futures::StreamExt;
 
 /// This example shows that it is possible to convert query results into Rust structs .
-/// It will collect the query results into RecordBatch, then convert it to serde_json::Value.

Review Comment:
   https://github.com/apache/arrow-rs/pull/5318 deprecated the serde_json based APIs



##########
datafusion/common/src/file_options/parquet_writer.rs:
##########
@@ -156,6 +156,7 @@ pub(crate) fn parse_encoding_string(
         "plain" => Ok(parquet::basic::Encoding::PLAIN),
         "plain_dictionary" => Ok(parquet::basic::Encoding::PLAIN_DICTIONARY),
         "rle" => Ok(parquet::basic::Encoding::RLE),
+        #[allow(deprecated)]

Review Comment:
   https://github.com/apache/arrow-rs/pull/5318



-- 
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