This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 383d79330 minor: remove useless prefix and fix typo. (#4357)
383d79330 is described below
commit 383d7933097c238e325e76490c66dd0f79c52fcc
Author: jakevin <[email protected]>
AuthorDate: Sat Jun 3 18:05:42 2023 +0800
minor: remove useless prefix and fix typo. (#4357)
---
.../src/builder/generic_byte_run_builder.rs | 24 +++++++++++-----------
arrow-cast/src/cast.rs | 12 +++++------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/arrow-array/src/builder/generic_byte_run_builder.rs
b/arrow-array/src/builder/generic_byte_run_builder.rs
index 97082fe96..4e3f36889 100644
--- a/arrow-array/src/builder/generic_byte_run_builder.rs
+++ b/arrow-array/src/builder/generic_byte_run_builder.rs
@@ -391,7 +391,7 @@ mod tests {
use crate::GenericByteArray;
use crate::Int16RunArray;
- fn test_bytes_run_buider<T>(values: Vec<&T::Native>)
+ fn test_bytes_run_builder<T>(values: Vec<&T::Native>)
where
T: ByteArrayType,
<T as ByteArrayType>::Native: PartialEq,
@@ -428,21 +428,21 @@ mod tests {
}
#[test]
- fn test_string_run_buider() {
- test_bytes_run_buider::<Utf8Type>(vec!["abc", "def", "ghi"]);
+ fn test_string_run_builder() {
+ test_bytes_run_builder::<Utf8Type>(vec!["abc", "def", "ghi"]);
}
#[test]
- fn test_string_run_buider_with_empty_strings() {
- test_bytes_run_buider::<Utf8Type>(vec!["abc", "", "ghi"]);
+ fn test_string_run_builder_with_empty_strings() {
+ test_bytes_run_builder::<Utf8Type>(vec!["abc", "", "ghi"]);
}
#[test]
- fn test_binary_run_buider() {
- test_bytes_run_buider::<BinaryType>(vec![b"abc", b"def", b"ghi"]);
+ fn test_binary_run_builder() {
+ test_bytes_run_builder::<BinaryType>(vec![b"abc", b"def", b"ghi"]);
}
- fn test_bytes_run_buider_finish_cloned<T>(values: Vec<&T::Native>)
+ fn test_bytes_run_builder_finish_cloned<T>(values: Vec<&T::Native>)
where
T: ByteArrayType,
<T as ByteArrayType>::Native: PartialEq,
@@ -498,13 +498,13 @@ mod tests {
}
#[test]
- fn test_string_run_buider_finish_cloned() {
- test_bytes_run_buider_finish_cloned::<Utf8Type>(vec!["abc", "def",
"ghi"]);
+ fn test_string_run_builder_finish_cloned() {
+ test_bytes_run_builder_finish_cloned::<Utf8Type>(vec!["abc", "def",
"ghi"]);
}
#[test]
- fn test_binary_run_buider_finish_cloned() {
- test_bytes_run_buider_finish_cloned::<BinaryType>(vec![b"abc", b"def",
b"ghi"]);
+ fn test_binary_run_builder_finish_cloned() {
+ test_bytes_run_builder_finish_cloned::<BinaryType>(vec![b"abc",
b"def", b"ghi"]);
}
#[test]
diff --git a/arrow-cast/src/cast.rs b/arrow-cast/src/cast.rs
index 839326d08..1e491d844 100644
--- a/arrow-cast/src/cast.rs
+++ b/arrow-cast/src/cast.rs
@@ -254,8 +254,8 @@ pub fn can_cast_types(from_type: &DataType, to_type:
&DataType) -> bool {
},
(Duration(_), Interval(MonthDayNano)) => true,
(Interval(MonthDayNano), Duration(_)) => true,
- (Interval(IntervalUnit::YearMonth),
Interval(IntervalUnit::MonthDayNano)) => true,
- (Interval(IntervalUnit::DayTime),
Interval(IntervalUnit::MonthDayNano)) => true,
+ (Interval(YearMonth), Interval(MonthDayNano)) => true,
+ (Interval(DayTime), Interval(MonthDayNano)) => true,
(_, _) => false,
}
}
@@ -2166,16 +2166,16 @@ pub fn cast_with_options(
(Duration(TimeUnit::Nanosecond), Interval(IntervalUnit::MonthDayNano))
=> {
cast_duration_to_interval::<DurationNanosecondType>(array,
cast_options)
}
- (Interval(IntervalUnit::MonthDayNano),
DataType::Duration(TimeUnit::Second)) => {
+ (Interval(IntervalUnit::MonthDayNano), Duration(TimeUnit::Second)) => {
cast_interval_to_duration::<DurationSecondType>(array,
cast_options)
}
- (Interval(IntervalUnit::MonthDayNano),
DataType::Duration(TimeUnit::Millisecond)) => {
+ (Interval(IntervalUnit::MonthDayNano),
Duration(TimeUnit::Millisecond)) => {
cast_interval_to_duration::<DurationMillisecondType>(array,
cast_options)
}
- (Interval(IntervalUnit::MonthDayNano),
DataType::Duration(TimeUnit::Microsecond)) => {
+ (Interval(IntervalUnit::MonthDayNano),
Duration(TimeUnit::Microsecond)) => {
cast_interval_to_duration::<DurationMicrosecondType>(array,
cast_options)
}
- (Interval(IntervalUnit::MonthDayNano),
DataType::Duration(TimeUnit::Nanosecond)) => {
+ (Interval(IntervalUnit::MonthDayNano), Duration(TimeUnit::Nanosecond))
=> {
cast_interval_to_duration::<DurationNanosecondType>(array,
cast_options)
}
(Interval(IntervalUnit::YearMonth),
Interval(IntervalUnit::MonthDayNano)) => {