You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/23 05:58:15 UTC

[GitHub] [arrow] jorgecarleitao opened a new pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

jorgecarleitao opened a new pull request #9297:
URL: https://github.com/apache/arrow/pull/9297


   This PR improves the performance of certain time / date casts by using the brand new API proposed in #9235 .
   
   That API allows for a very fast execution of unary and infalible operations on primitive arrays, and this PR leverages that for cast operations that require some mathematical operation.
   
   ```
   Switched to branch 'fast_unary'
      Compiling arrow v3.0.0-SNAPSHOT (/Users/jorgecarleitao/projects/arrow/rust/arrow)
       Finished bench [optimized] target(s) in 1m 06s
        Running /Users/jorgecarleitao/projects/arrow/rust/target/release/deps/cast_kernels-25ee76597a8b997b
   Gnuplot not found, using plotters backend
   
   cast date64 to date32 512                                                                             
                           time:   [1.1668 us 1.1706 us 1.1749 us]
                           change: [-83.347% -83.248% -83.144%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 5 outliers among 100 measurements (5.00%)
     3 (3.00%) high mild
     2 (2.00%) high severe
   
   cast date32 to date64 512                                                                             
                           time:   [899.73 ns 930.58 ns 971.56 ns]
                           change: [-86.799% -86.520% -86.190%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 10 outliers among 100 measurements (10.00%)
     3 (3.00%) high mild
     7 (7.00%) high severe
   
   cast time32s to time32ms 512                                                                             
                           time:   [728.73 ns 732.33 ns 735.90 ns]
                           change: [-54.503% -54.201% -53.917%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 2 outliers among 100 measurements (2.00%)
     1 (1.00%) high mild
     1 (1.00%) high severe
   
   cast time64ns to time32s 512                                                                             
                           time:   [4.8374 us 4.8447 us 4.8526 us]
                           change: [-57.022% -56.791% -56.587%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 8 outliers among 100 measurements (8.00%)
     6 (6.00%) high mild
     2 (2.00%) high severe
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563293232



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Should we call this something more general, like `arity` https://en.wikipedia.org/wiki/Arity
   
   We'd probably want a binary function that takes 2 arguments, or maybe ternary if we're feeling cute enough to push it 😉.
   
   EDIT: `math_op` is binary




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io edited a comment on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me closed pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me closed pull request #9297:
URL: https://github.com/apache/arrow/pull/9297


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io edited a comment on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=h1) Report
   > Merging [#9297](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=desc) (497b59d) into [master](https://codecov.io/gh/apache/arrow/commit/67d0c2e38011cd883059e3a9fd0ea08088661707?el=desc) (67d0c2e) will **increase** coverage by `0.04%`.
   > The diff coverage is `97.36%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9297/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9297      +/-   ##
   ==========================================
   + Coverage   81.84%   81.88%   +0.04%     
   ==========================================
     Files         215      216       +1     
     Lines       52949    52983      +34     
   ==========================================
   + Hits        43336    43387      +51     
   + Misses       9613     9596      -17     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/compute/kernels/arity.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2FyaXR5LnJz) | `91.66% <91.66%> (ø)` | |
   | [rust/arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2Nhc3QucnM=) | `97.08% <100.00%> (+0.09%)` | :arrow_up: |
   | [rust/parquet/src/encodings/encoding.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9wYXJxdWV0L3NyYy9lbmNvZGluZ3MvZW5jb2RpbmcucnM=) | `95.24% <0.00%> (-0.20%)` | :arrow_down: |
   | [rust/arrow/src/array/array\_primitive.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvYXJyYXlfcHJpbWl0aXZlLnJz) | `94.48% <0.00%> (-0.05%)` | :arrow_down: |
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `96.21% <0.00%> (+2.52%)` | :arrow_up: |
   | [rust/arrow/src/array/array\_string.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvYXJyYXlfc3RyaW5nLnJz) | `94.11% <0.00%> (+4.11%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=footer). Last update [67d0c2e...497b59d](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io edited a comment on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=h1) Report
   > Merging [#9297](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=desc) (f88847c) into [master](https://codecov.io/gh/apache/arrow/commit/437c8c944acb3479b76804f041f5f8cbce309fa7?el=desc) (437c8c9) will **increase** coverage by `0.00%`.
   > The diff coverage is `97.36%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9297/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #9297   +/-   ##
   =======================================
     Coverage   81.88%   81.89%           
   =======================================
     Files         215      216    +1     
     Lines       52988    52983    -5     
   =======================================
   - Hits        43391    43388    -3     
   + Misses       9597     9595    -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/compute/kernels/arity.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2FyaXR5LnJz) | `91.66% <91.66%> (ø)` | |
   | [rust/arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2Nhc3QucnM=) | `97.08% <100.00%> (+0.09%)` | :arrow_up: |
   | [rust/parquet/src/encodings/encoding.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9wYXJxdWV0L3NyYy9lbmNvZGluZ3MvZW5jb2RpbmcucnM=) | `95.43% <0.00%> (+0.19%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=footer). Last update [437c8c9...f88847c](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563940743



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Since this was only unary, I gave it that name. Note that we can lift all binary arithmetics into a generic like this one and place it there.
   
   I do not have strong feelings here, but it is the first time I hear about `arity` xD

##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Since this was only unary, I gave it that name. Note that we can lift all binary arithmetics into a generic like this one and place it together.
   
   I do not have strong feelings here, but it is the first time I hear about `arity` xD

##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       That would be backward incompatible, so it would be good to change it soon. I will change to arity. It is a fun name. Another option would be `generics`, but that is too generic. :)




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563293232



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Should we call this something more general, like `arity` https://en.wikipedia.org/wiki/Arity
   
   We'd probably want a binary function that takes 2 arguments, or maybe ternary if we're feeling cute enough to push it 😉




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765873864


   https://issues.apache.org/jira/browse/ARROW-11354


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563940743



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Since this was only unary, I gave it that name. Note that we can lift all binary arithmetics into a generic like this one and place it there.
   
   I do not have strong feelings here, but it is the first time I hear about `arity` xD




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563945256



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       No worries, whoever adds a ternary function can change the name.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563288134



##########
File path: rust/arrow/src/compute/kernels/unary.rs
##########
@@ -0,0 +1,74 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Defines kernels suitable to perform unary operations to primitive arrays.
+
+use crate::array::{Array, ArrayData, PrimitiveArray};
+use crate::buffer::Buffer;
+use crate::datatypes::ArrowPrimitiveType;
+
+#[inline]
+fn into_primitive_array_data<I: ArrowPrimitiveType, O: ArrowPrimitiveType>(
+    array: &PrimitiveArray<I>,
+    buffer: Buffer,
+) -> ArrayData {
+    ArrayData::new(
+        O::DATA_TYPE,
+        array.len(),
+        None,

Review comment:
       We could save a further few cycles here by specifying the null count, as it's known and trusted to be correct.

##########
File path: rust/arrow/src/compute/kernels/unary.rs
##########
@@ -0,0 +1,74 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Defines kernels suitable to perform unary operations to primitive arrays.
+
+use crate::array::{Array, ArrayData, PrimitiveArray};
+use crate::buffer::Buffer;
+use crate::datatypes::ArrowPrimitiveType;
+
+#[inline]
+fn into_primitive_array_data<I: ArrowPrimitiveType, O: ArrowPrimitiveType>(
+    array: &PrimitiveArray<I>,
+    buffer: Buffer,
+) -> ArrayData {
+    ArrayData::new(
+        O::DATA_TYPE,
+        array.len(),
+        None,
+        array.data_ref().null_buffer().cloned(),
+        0,
+        vec![buffer],
+        vec![],
+    )
+}
+
+/// Applies an unary and infalible function to a primitive array.
+/// This is the fastest way to perform an operation on a primitive array when
+/// the benefits of a vectorized operation outweights the cost of branching nulls and non-nulls.
+/// # Implementation
+/// This will apply the function for all values, including those on null slots.
+/// This implies that the operation must be infalible for any value of the corresponding type
+/// or this function may panic.
+/// # Example
+/// ```rust
+/// # use arrow::array::Int32Array;
+/// # use arrow::datatypes::Int32Type;
+/// # use arrow::compute::kernels::unary::unary;
+/// # fn main() {
+/// let array = Int32Array::from(vec![Some(5), Some(7), None]);
+/// let c = unary::<_, _, Int32Type>(&array, |x| x * 2 + 1);
+/// assert_eq!(c, Int32Array::from(vec![Some(11), Some(15), None]));

Review comment:
       This is a great and simple example, and I wonder if the compiler is smart enough to optimise 2 commutative unary functions to perform as well as a single combined one.
   
   Worth trying out some time.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563947735



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       That would be backward incompatible, so it would be good to change it soon. I will change to arity. It is a fun name. Another option would be `generics`, but that is too generic. :)




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765885411


   NOTE: this PR is 40 LOC change. The rest comes from the other PR. Please wait for the merge, this is only a draft to indicate what can be done with this.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io commented on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=h1) Report
   > Merging [#9297](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=desc) (02ba749) into [master](https://codecov.io/gh/apache/arrow/commit/c413566b34bd0c13a01a68148bd78df1bdec3c10?el=desc) (c413566) will **increase** coverage by `0.25%`.
   > The diff coverage is `88.75%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9297/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9297      +/-   ##
   ==========================================
   + Coverage   81.61%   81.87%   +0.25%     
   ==========================================
     Files         215      215              
     Lines       52508    53095     +587     
   ==========================================
   + Hits        42854    43469     +615     
   + Misses       9654     9626      -28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/bytes.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnl0ZXMucnM=) | `53.12% <ø> (ø)` | |
   | [rust/arrow/src/array/transform/fixed\_binary.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL2ZpeGVkX2JpbmFyeS5ycw==) | `78.94% <50.00%> (ø)` | |
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `93.68% <82.95%> (-2.51%)` | :arrow_down: |
   | [rust/arrow/src/compute/util.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS91dGlsLnJz) | `98.48% <91.66%> (-0.44%)` | :arrow_down: |
   | [rust/arrow/src/compute/kernels/arithmetic.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2FyaXRobWV0aWMucnM=) | `89.55% <95.83%> (-0.28%)` | :arrow_down: |
   | [rust/arrow/src/array/transform/primitive.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL3ByaW1pdGl2ZS5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2Nhc3QucnM=) | `97.09% <100.00%> (+0.10%)` | :arrow_up: |
   | [rust/arrow/src/compute/kernels/length.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2xlbmd0aC5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/array/data.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvZGF0YS5ycw==) | `78.86% <0.00%> (-18.45%)` | :arrow_down: |
   | [rust/arrow/src/array/builder.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvYnVpbGRlci5ycw==) | `85.10% <0.00%> (-0.42%)` | :arrow_down: |
   | ... and [18 more](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=footer). Last update [c413566...02ba749](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io edited a comment on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=h1) Report
   > Merging [#9297](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=desc) (234ed1f) into [master](https://codecov.io/gh/apache/arrow/commit/c413566b34bd0c13a01a68148bd78df1bdec3c10?el=desc) (c413566) will **increase** coverage by `0.25%`.
   > The diff coverage is `88.53%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9297/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9297      +/-   ##
   ==========================================
   + Coverage   81.61%   81.87%   +0.25%     
   ==========================================
     Files         215      216       +1     
     Lines       52508    53092     +584     
   ==========================================
   + Hits        42854    43467     +613     
   + Misses       9654     9625      -29     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/bytes.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnl0ZXMucnM=) | `53.12% <ø> (ø)` | |
   | [rust/arrow/src/array/transform/fixed\_binary.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL2ZpeGVkX2JpbmFyeS5ycw==) | `78.94% <50.00%> (ø)` | |
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `93.68% <82.95%> (-2.51%)` | :arrow_down: |
   | [rust/arrow/src/compute/kernels/unary.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL3VuYXJ5LnJz) | `91.66% <91.66%> (ø)` | |
   | [rust/arrow/src/compute/kernels/arithmetic.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2FyaXRobWV0aWMucnM=) | `89.55% <95.83%> (-0.28%)` | :arrow_down: |
   | [rust/arrow/src/array/transform/primitive.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL3ByaW1pdGl2ZS5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2Nhc3QucnM=) | `97.08% <100.00%> (+0.09%)` | :arrow_up: |
   | [rust/arrow/src/compute/kernels/length.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2xlbmd0aC5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/array/data.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvZGF0YS5ycw==) | `78.86% <0.00%> (-18.45%)` | :arrow_down: |
   | [rust/arrow/src/array/builder.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvYnVpbGRlci5ycw==) | `85.10% <0.00%> (-0.42%)` | :arrow_down: |
   | ... and [18 more](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=footer). Last update [c413566...234ed1f](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563945256



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       No worries, whoever adds a ternary function can change the name.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#discussion_r563940743



##########
File path: rust/arrow/src/compute/kernels/mod.rs
##########
@@ -30,3 +30,4 @@ pub mod sort;
 pub mod substring;
 pub mod take;
 pub mod temporal;
+pub mod unary;

Review comment:
       Since this was only unary, I gave it that name. Note that we can lift all binary arithmetics into a generic like this one and place it together.
   
   I do not have strong feelings here, but it is the first time I hear about `arity` xD




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io edited a comment on pull request #9297: ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9297:
URL: https://github.com/apache/arrow/pull/9297#issuecomment-765883730


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=h1) Report
   > Merging [#9297](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=desc) (b209f72) into [master](https://codecov.io/gh/apache/arrow/commit/c413566b34bd0c13a01a68148bd78df1bdec3c10?el=desc) (c413566) will **increase** coverage by `0.25%`.
   > The diff coverage is `88.53%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9297/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9297      +/-   ##
   ==========================================
   + Coverage   81.61%   81.86%   +0.25%     
   ==========================================
     Files         215      216       +1     
     Lines       52508    53092     +584     
   ==========================================
   + Hits        42854    43466     +612     
   + Misses       9654     9626      -28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/bytes.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnl0ZXMucnM=) | `53.12% <ø> (ø)` | |
   | [rust/arrow/src/array/transform/fixed\_binary.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL2ZpeGVkX2JpbmFyeS5ycw==) | `78.94% <50.00%> (ø)` | |
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `93.68% <82.95%> (-2.51%)` | :arrow_down: |
   | [rust/arrow/src/compute/kernels/unary.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL3VuYXJ5LnJz) | `91.66% <91.66%> (ø)` | |
   | [rust/arrow/src/compute/kernels/arithmetic.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2FyaXRobWV0aWMucnM=) | `89.55% <95.83%> (-0.28%)` | :arrow_down: |
   | [rust/arrow/src/array/transform/primitive.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvdHJhbnNmb3JtL3ByaW1pdGl2ZS5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2Nhc3QucnM=) | `97.08% <100.00%> (+0.09%)` | :arrow_up: |
   | [rust/arrow/src/compute/kernels/length.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY29tcHV0ZS9rZXJuZWxzL2xlbmd0aC5ycw==) | `100.00% <100.00%> (ø)` | |
   | [rust/arrow/src/array/data.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvZGF0YS5ycw==) | `78.86% <0.00%> (-18.45%)` | :arrow_down: |
   | [rust/arrow/src/array/builder.rs](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYXJyYXkvYnVpbGRlci5ycw==) | `85.10% <0.00%> (-0.42%)` | :arrow_down: |
   | ... and [19 more](https://codecov.io/gh/apache/arrow/pull/9297/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=footer). Last update [c413566...234ed1f](https://codecov.io/gh/apache/arrow/pull/9297?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org