You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by vi...@apache.org on 2022/06/17 16:15:49 UTC

[arrow-rs] branch master updated: Minor: Add examples to docstring for `weekday` (#1894)

This is an automated email from the ASF dual-hosted git repository.

viirya 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 b39cf581e Minor: Add examples to docstring for `weekday` (#1894)
b39cf581e is described below

commit b39cf581e7cf846837426ec4b145e184c772c5a3
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Fri Jun 17 12:15:45 2022 -0400

    Minor: Add examples to docstring for `weekday` (#1894)
---
 arrow/src/compute/kernels/temporal.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arrow/src/compute/kernels/temporal.rs b/arrow/src/compute/kernels/temporal.rs
index f731ff5ce..9998649ea 100644
--- a/arrow/src/compute/kernels/temporal.rs
+++ b/arrow/src/compute/kernels/temporal.rs
@@ -267,7 +267,10 @@ where
     Ok(b.finish())
 }
 
-/// Extracts the day of week of a given temporal array as an array of integers
+/// Extracts the day of week of a given temporal array as an array of
+/// integers.
+///
+/// Monday is encoded as `0`, Tuesday as `1`, etc.
 pub fn weekday<T>(array: &PrimitiveArray<T>) -> Result<Int32Array>
 where
     T: ArrowTemporalType + ArrowNumericType,