Skip to content

Commit

Permalink
[doc] Fix broken URLs (#3486)
Browse files Browse the repository at this point in the history
* [doc] Fix broken URLs

Use proper syntax when [linking to items by name].

Before:
https://docs.rs/arrow-array/latest/arrow_array/iterator/%5Bcrate::PrimitiveArray%5D

After:
https://docs.rs/arrow-array/latest/arrow_array/array/struct.PrimitiveArray.html

[linking to items by name]: https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html

* [doc] Use proper identifiers

arrow-array:
- `DecimalArray` is undefined. Use `PrimitiveArray` instead.
- `arrow` crate is not among `arrow-array`'s dependencies, so
  its items cannot be referred to using ['intra-doc link'] syntax.

['intra-doc link']: https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html
  • Loading branch information
vvv committed Jan 7, 2023
1 parent c28d69a commit 8492c27
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions arrow-array/src/iterator.rs
Expand Up @@ -39,9 +39,9 @@ use crate::array::{
/// there are more efficient ways to iterate over just the non-null indices, this functionality
/// is provided by [`compute::try_unary`]
///
/// [`PrimitiveArray`]: [crate::PrimitiveArray]
/// [`compute::unary`]: [arrow::compute::unary]
/// [`compute::try_unary`]: [arrow::compute::try_unary]
/// [`PrimitiveArray`]: crate::PrimitiveArray
/// [`compute::unary`]: https://docs.rs/arrow/latest/arrow/compute/fn.unary.html
/// [`compute::try_unary`]: https://docs.rs/arrow/latest/arrow/compute/fn.try_unary.html
#[derive(Debug)]
pub struct ArrayIter<T: ArrayAccessor> {
array: T,
Expand Down
8 changes: 4 additions & 4 deletions arrow-array/src/types.rs
Expand Up @@ -559,15 +559,15 @@ mod decimal {
impl DecimalTypeSealed for Decimal256Type {}
}

/// A trait over the decimal types, used by [`DecimalArray`] to provide a generic
/// A trait over the decimal types, used by [`PrimitiveArray`] to provide a generic
/// implementation across the various decimal types
///
/// Implemented by [`Decimal128Type`] and [`Decimal256Type`] for [`Decimal128Array`]
/// and [`Decimal256Array`] respectively
///
/// [`DecimalArray`]: [crate::array::DecimalArray]
/// [`Decimal128Array`]: [crate::array::Decimal128Array]
/// [`Decimal256Array`]: [crate::array::Decimal256Array]
/// [`PrimitiveArray`]: crate::array::PrimitiveArray
/// [`Decimal128Array`]: crate::array::Decimal128Array
/// [`Decimal256Array`]: crate::array::Decimal256Array
pub trait DecimalType:
'static + Send + Sync + ArrowPrimitiveType + decimal::DecimalTypeSealed
{
Expand Down
4 changes: 2 additions & 2 deletions object_store/src/aws/mod.rs
Expand Up @@ -814,8 +814,8 @@ impl AmazonS3Builder {
///
/// This option has no effect if not using instance credentials
///
/// [IMDSv2]: [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html]
/// [SSRF attack]: [https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/]
/// [IMDSv2]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
/// [SSRF attack]: https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/
///
pub fn with_imdsv1_fallback(mut self) -> Self {
self.imdsv1_fallback = true;
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/arrow/arrow_reader/filter.rs
Expand Up @@ -94,7 +94,7 @@ where
/// leaves 99% of the rows, it may be better to not filter the data from parquet and
/// apply the filter after the RecordBatch has been fully decoded.
///
/// [`RowSelection`]: [super::selection::RowSelection]
/// [`RowSelection`]: crate::arrow::arrow_reader::RowSelection
pub struct RowFilter {
/// A list of [`ArrowPredicate`]
pub(crate) predicates: Vec<Box<dyn ArrowPredicate>>,
Expand Down
6 changes: 3 additions & 3 deletions parquet/src/arrow/arrow_reader/mod.rs
Expand Up @@ -50,7 +50,7 @@ pub use selection::{RowSelection, RowSelector};
/// * For a synchronous API - [`ParquetRecordBatchReaderBuilder`]
/// * For an asynchronous API - [`ParquetRecordBatchStreamBuilder`]
///
/// [`ParquetRecordBatchStreamBuilder`]: [crate::arrow::async_reader::ParquetRecordBatchStreamBuilder]
/// [`ParquetRecordBatchStreamBuilder`]: crate::arrow::async_reader::ParquetRecordBatchStreamBuilder
pub struct ArrowReaderBuilder<T> {
pub(crate) input: T,

Expand Down Expand Up @@ -150,7 +150,7 @@ impl<T> ArrowReaderBuilder<T> {
/// An example use case of this would be applying a selection determined by
/// evaluating predicates against the [`Index`]
///
/// [`Index`]: [parquet::file::page_index::index::Index]
/// [`Index`]: crate::file::page_index::index::Index
pub fn with_row_selection(self, selection: RowSelection) -> Self {
Self {
selection: Some(selection),
Expand Down Expand Up @@ -238,7 +238,7 @@ impl ArrowReaderOptions {
/// Set this true to enable decoding of the [PageIndex] if present. This can be used
/// to push down predicates to the parquet scan, potentially eliminating unnecessary IO
///
/// [PageIndex]: [https://github.com/apache/parquet-format/blob/master/PageIndex.md]
/// [PageIndex]: https://github.com/apache/parquet-format/blob/master/PageIndex.md
pub fn with_page_index(self, page_index: bool) -> Self {
Self { page_index, ..self }
}
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/arrow/arrow_reader/selection.rs
Expand Up @@ -83,7 +83,7 @@ impl RowSelector {
/// assert_eq!(actual, expected);
/// ```
///
/// [`PageIndex`]: [crate::file::page_index::index::PageIndex]
/// [`PageIndex`]: crate::file::page_index::index::PageIndex
#[derive(Debug, Clone, Default, Eq, PartialEq)]
pub struct RowSelection {
selectors: Vec<RowSelector>,
Expand Down

0 comments on commit 8492c27

Please sign in to comment.