Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update string-view branch to arrow-rs main #10966

Merged
merged 6 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,20 @@ large_futures = "warn"

[workspace.lints.rust]
unused_imports = "deny"

## Temporary arrow-rs patch until 52.1.0 is released


[patch.crates-io]
arrow = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-array = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-buffer = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-cast = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c"}
arrow-data = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c"}
arrow-ipc = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c"}
arrow-schema = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c"}
arrow-select = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-string = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-ord = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
arrow-flight = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
parquet = { git = "https://github.com/apache/arrow-rs.git", rev = "72467c670f8c38130e4743347407f1a542e59e0c" }
4 changes: 0 additions & 4 deletions datafusion/common/src/scalar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5446,16 +5446,12 @@ mod tests {
DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8)),
);

// needs https://github.com/apache/arrow-rs/issues/5893
/*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test now works!

check_scalar_cast(ScalarValue::Utf8(None), DataType::Utf8View);
check_scalar_cast(ScalarValue::from("foo"), DataType::Utf8View);
check_scalar_cast(
ScalarValue::from("larger than 12 bytes string"),
DataType::Utf8View,
);

*/
}

// mimics how casting work on scalar values by `casting` `scalar` to `desired_type`
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr/src/type_coercion/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ fn temporal_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTyp
(Nanosecond, Microsecond) => Microsecond,
(l, r) => {
assert_eq!(l, r);
l.clone()
*l
}
};

Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,11 @@ fn coerced_from<'a>(
(Timestamp(unit, Some(tz)), _) if tz.as_ref() == TIMEZONE_WILDCARD => {
match type_from {
Timestamp(_, Some(from_tz)) => {
Some(Timestamp(unit.clone(), Some(from_tz.clone())))
Some(Timestamp(*unit, Some(from_tz.clone())))
}
Null | Date32 | Utf8 | LargeUtf8 | Timestamp(_, None) => {
// In the absence of any other information assume the time zone is "+00" (UTC).
Some(Timestamp(unit.clone(), Some("+00".into())))
Some(Timestamp(*unit, Some("+00".into())))
}
_ => None,
}
Expand Down
14 changes: 7 additions & 7 deletions datafusion/functions/src/datetime/date_bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,35 @@ impl DateBinFunc {
vec![
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
Timestamp(Nanosecond, None),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
Timestamp(Nanosecond, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
Timestamp(Nanosecond, None),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
Timestamp(Nanosecond, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
]),
Exact(vec![
DataType::Interval(DayTime),
Expand Down
Loading