You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/12/05 19:55:55 UTC
Re: [PR] Minor: Use `ScalarValue::from` impl for strings [arrow-datafusion]
alamb commented on code in PR #8429:
URL: https://github.com/apache/arrow-datafusion/pull/8429#discussion_r1416208386
##########
datafusion/core/src/datasource/physical_plan/file_scan_config.rs:
##########
@@ -654,15 +654,9 @@ mod tests {
// file_batch is ok here because we kept all the file cols in the projection
file_batch,
&[
- wrap_partition_value_in_dict(ScalarValue::Utf8(Some(
- "2021".to_owned(),
- ))),
- wrap_partition_value_in_dict(ScalarValue::Utf8(Some(
- "10".to_owned(),
- ))),
- wrap_partition_value_in_dict(ScalarValue::Utf8(Some(
- "26".to_owned(),
- ))),
+ wrap_partition_value_in_dict(ScalarValue::from("2021")),
Review Comment:
This looks better and more concise to me. Hopefully by updating the code we'll also make the codebase easier to work with over time too
--
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