Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Sep 1, 2022
1 parent 8c4aa31 commit fef92be
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion parquet/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ $ docker build -t thrift build/docker/ubuntu-bionic
$ docker run -v $(pwd):/thrift/src -it thrift build/docker/scripts/cmake.sh && wget https://raw.githubusercontent.com/apache/parquet-format/apache-parquet-format-2.9.0/src/main/thrift/parquet.thrift && ./cmake_build/compiler/cpp/bin/thrift --gen rs parquet.thrift
```

Then copy the generated `parquet.rs` into `src/format.rs` and commit changes.
Then copy the generated `parquet.rs` into `src/format.rs` and commit changes.
2 changes: 1 addition & 1 deletion parquet/src/arrow/async_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};

use crate::format::OffsetIndex;
use bytes::{Buf, Bytes};
use futures::future::{BoxFuture, FutureExt};
use futures::ready;
use futures::stream::Stream;
use crate::format::OffsetIndex;
use thrift::protocol::TCompactInputProtocol;

use tokio::io::{AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt};
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/file/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ mod tests {

use crate::basic::SortOrder;
use crate::basic::Type;
use crate::schema::types::Type as SchemaType;
use crate::format::TypeDefinedOrder;
use crate::schema::types::Type as SchemaType;

#[test]
fn test_parse_metadata_size_smaller_than_footer() {
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/file/page_index/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use crate::basic::Type;
use crate::data_type::private::ParquetValueType;
use crate::data_type::Int96;
use crate::errors::ParquetError;
use crate::util::bit_util::from_le_slice;
use crate::format::{BoundaryOrder, ColumnIndex};
use crate::util::bit_util::from_le_slice;
use std::fmt::Debug;

/// The statistics in one page
Expand Down
10 changes: 5 additions & 5 deletions parquet/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4408,7 +4408,7 @@ impl PageLocation {
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct OffsetIndex {
/// PageLocations, ordered by increasing PageLocation.offset. It is required
/// that page_locations[i].first_row_index < page_locations[i+1].first_row_index.
/// that page_locations\[i\].first_row_index < page_locations\[i+1\].first_row_index.
pub page_locations: Vec<PageLocation>,
}

Expand Down Expand Up @@ -4471,27 +4471,27 @@ impl OffsetIndex {
//

/// Description for ColumnIndex.
/// Each <array-field>[i] refers to the page at OffsetIndex.page_locations[i]
/// Each <array-field>\[i\] refers to the page at OffsetIndex.page_locations\[i\]
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ColumnIndex {
/// A list of Boolean values to determine the validity of the corresponding
/// min and max values. If true, a page contains only null values, and writers
/// have to set the corresponding entries in min_values and max_values to
/// byte[0], so that all lists have the same length. If false, the
/// byte\[0\], so that all lists have the same length. If false, the
/// corresponding entries in min_values and max_values must be valid.
pub null_pages: Vec<bool>,
/// Two lists containing lower and upper bounds for the values of each page.
/// These may be the actual minimum and maximum values found on a page, but
/// can also be (more compact) values that do not exist on a page. For
/// example, instead of storing ""Blart Versenwald III", a writer may set
/// min_values[i]="B", max_values[i]="C". Such more compact values must still
/// min_values\[i\]="B", max_values\[i\]="C". Such more compact values must still
/// be valid values within the column's logical type. Readers must make sure
/// that list entries are populated before using them by inspecting null_pages.
pub min_values: Vec<Vec<u8>>,
pub max_values: Vec<Vec<u8>>,
/// Stores whether both min_values and max_values are orderd and if so, in
/// which direction. This allows readers to perform binary searches in both
/// lists. Readers cannot assume that max_values[i] <= min_values[i+1], even
/// lists. Readers cannot assume that max_values\[i\] <= min_values\[i+1\], even
/// if the lists are ordered.
pub boundary_order: BoundaryOrder,
/// A list containing the number of null values for each page *
Expand Down

0 comments on commit fef92be

Please sign in to comment.