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
Doc improvements #3155
Merged
Merged
Doc improvements #3155
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
75564fe
Improving arrow-json docs
psvri 51bc016
Improving arrow-array docs
psvri f61250f
Fix tests
psvri 85dac77
Fix typos
psvri 862f9dc
Incorporate review comments
psvri f70267c
Merge branch 'master' into doc-improvements
psvri d547325
Merge branch 'master' into doc-improvements
psvri 14f9135
Improve doc for fixed_size_list_builder
psvri 15b167b
Fix doc comments
psvri File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -165,21 +165,48 @@ pub type TimestampMicrosecondArray = PrimitiveArray<TimestampMicrosecondType>; | |||||
/// A primitive array where each element is of type `TimestampNanosecondType.` | ||||||
/// See examples for [`TimestampSecondArray.`](crate::array::TimestampSecondArray) | ||||||
pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>; | ||||||
|
||||||
// TODO: give examples for the below types | ||||||
|
||||||
/// A primitive array where each element is of 32-bit date type. | ||||||
pub type Date32Array = PrimitiveArray<Date32Type>; | ||||||
/// A primitive array where each element is of 64-bit date type. | ||||||
pub type Date64Array = PrimitiveArray<Date64Type>; | ||||||
|
||||||
/// An array where each element is of 32-bit type representing time elapsed in seconds | ||||||
/// since midnight. | ||||||
pub type Time32SecondArray = PrimitiveArray<Time32SecondType>; | ||||||
/// An array where each element is of 32-bit type representing time elapsed in milliseconds | ||||||
/// since midnight. | ||||||
pub type Time32MillisecondArray = PrimitiveArray<Time32MillisecondType>; | ||||||
/// An array where each element is of 64-bit type representing time elapsed in microseconds | ||||||
/// since midnight. | ||||||
pub type Time64MicrosecondArray = PrimitiveArray<Time64MicrosecondType>; | ||||||
/// An array where each element is of 64-bit type representing time elapsed in nanoseconds | ||||||
/// since midnight. | ||||||
pub type Time64NanosecondArray = PrimitiveArray<Time64NanosecondType>; | ||||||
|
||||||
/// An array where each element is a “calendar” interval in months. | ||||||
pub type IntervalYearMonthArray = PrimitiveArray<IntervalYearMonthType>; | ||||||
/// An array where each element is a “calendar” interval days and milliseconds. | ||||||
pub type IntervalDayTimeArray = PrimitiveArray<IntervalDayTimeType>; | ||||||
/// An array where each element is a “calendar” interval in months, days, and nanoseconds. | ||||||
pub type IntervalMonthDayNanoArray = PrimitiveArray<IntervalMonthDayNanoType>; | ||||||
|
||||||
/// An array where each element is an elapsed time type in seconds. | ||||||
pub type DurationSecondArray = PrimitiveArray<DurationSecondType>; | ||||||
/// An array where each element is an elapsed time type in milliseconds. | ||||||
pub type DurationMillisecondArray = PrimitiveArray<DurationMillisecondType>; | ||||||
/// An array where each element is an elapsed time type in microseconds. | ||||||
pub type DurationMicrosecondArray = PrimitiveArray<DurationMicrosecondType>; | ||||||
/// An array where each element is an elapsed time type in nanoseconds. | ||||||
pub type DurationNanosecondArray = PrimitiveArray<DurationNanosecondType>; | ||||||
|
||||||
/// An array where each element is a 128-bits decimal with precision in [1, 38] and | ||||||
/// scale in [0, 38]. | ||||||
pub type Decimal128Array = PrimitiveArray<Decimal128Type>; | ||||||
/// An array where each element is a 256-bits decimal with precision in [1, 76] and | ||||||
/// scale in [0, 76]. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
pub type Decimal256Array = PrimitiveArray<Decimal256Type>; | ||||||
|
||||||
/// Trait bridging the dynamic-typed nature of Arrow (via [`DataType`]) with the | ||||||
|
@@ -256,7 +283,7 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> { | |||||
} | ||||||
} | ||||||
|
||||||
// Returns a new primitive array builder | ||||||
/// Returns a new primitive array builder | ||||||
pub fn builder(capacity: usize) -> PrimitiveBuilder<T> { | ||||||
PrimitiveBuilder::<T>::with_capacity(capacity) | ||||||
} | ||||||
|
@@ -749,6 +776,7 @@ impl<'a, T: ArrowPrimitiveType> PrimitiveArray<T> { | |||||
/// the type can be collected to `PrimitiveArray`. | ||||||
#[derive(Debug)] | ||||||
pub struct NativeAdapter<T: ArrowPrimitiveType> { | ||||||
/// Corresponding Rust native type if available | ||||||
pub native: Option<T::Native>, | ||||||
} | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mad, missed seeing the negative scale support in the recent commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done