You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2022/10/15 19:15:13 UTC
[arrow-rs] branch master updated: Fix compilation error under `chrono-tz` feature (#2879)
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 c7f760636 Fix compilation error under `chrono-tz` feature (#2879)
c7f760636 is described below
commit c7f7606361d10299f68385e70555257f3503f1cb
Author: Liang-Chi Hsieh <vi...@gmail.com>
AuthorDate: Sat Oct 15 12:15:09 2022 -0700
Fix compilation error under `chrono-tz` feature (#2879)
* Fix compilation error
* Add compilation check
---
.github/workflows/arrow.yml | 5 ++++-
arrow/src/compute/kernels/cast.rs | 9 +++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/arrow.yml b/.github/workflows/arrow.yml
index 2838a3514..613f52f87 100644
--- a/.github/workflows/arrow.yml
+++ b/.github/workflows/arrow.yml
@@ -111,9 +111,12 @@ jobs:
- name: Check compilation --no-default-features --all-targets --features test_utils
run: |
cargo check -p arrow --no-default-features --all-targets --features test_utils
- - name: Check compilation --no-default-features --all-targets --features --ffi
+ - name: Check compilation --no-default-features --all-targets --features ffi
run: |
cargo check -p arrow --no-default-features --all-targets --features ffi
+ - name: Check compilation --no-default-features --all-targets --features chrono-tz
+ run: |
+ cargo check -p arrow --no-default-features --all-targets --features chrono-tz
# test the --features "simd" of the arrow crate. This requires nightly Rust.
linux-test-simd:
diff --git a/arrow/src/compute/kernels/cast.rs b/arrow/src/compute/kernels/cast.rs
index b05e4c4ba..66a04e91e 100644
--- a/arrow/src/compute/kernels/cast.rs
+++ b/arrow/src/compute/kernels/cast.rs
@@ -5640,10 +5640,9 @@ mod tests {
/// Creates a dictionary with primitive dictionary values, and keys of type K
#[cfg(feature = "chrono-tz")]
fn make_dictionary_primitive<K: ArrowDictionaryKeyType>() -> ArrayRef {
- let keys_builder = PrimitiveBuilder::<K>::new();
// Pick Int32 arbitrarily for dictionary values
- let values_builder = PrimitiveBuilder::<Int32Type>::new();
- let mut b = PrimitiveDictionaryBuilder::new(keys_builder, values_builder);
+ let mut b: PrimitiveDictionaryBuilder<K, Int32Type> =
+ PrimitiveDictionaryBuilder::new();
b.append(1).unwrap();
b.append(2).unwrap();
Arc::new(b.finish())
@@ -5652,10 +5651,8 @@ mod tests {
/// Creates a dictionary with utf8 values, and keys of type K
#[cfg(feature = "chrono-tz")]
fn make_dictionary_utf8<K: ArrowDictionaryKeyType>() -> ArrayRef {
- let keys_builder = PrimitiveBuilder::<K>::new();
// Pick Int32 arbitrarily for dictionary values
- let values_builder = StringBuilder::new();
- let mut b = StringDictionaryBuilder::new(keys_builder, values_builder);
+ let mut b: StringDictionaryBuilder<K> = StringDictionaryBuilder::new();
b.append("foo").unwrap();
b.append("bar").unwrap();
Arc::new(b.finish())