You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2022/07/08 16:30:10 UTC
[arrow-rs] branch master updated: Consistent case in Index enumeration (#2029)
This is an automated email from the ASF dual-hosted git repository.
tustvold 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 d70c2ea84 Consistent case in Index enumeration (#2029)
d70c2ea84 is described below
commit d70c2ea84b415bd5ad17dc41299a72dac69160ef
Author: Raphael Taylor-Davies <17...@users.noreply.github.com>
AuthorDate: Fri Jul 8 12:30:06 2022 -0400
Consistent case in Index enumeration (#2029)
---
parquet/src/file/page_index/index.rs | 8 ++++----
parquet/src/file/page_index/index_reader.rs | 2 +-
parquet/src/file/serialized_reader.rs | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/parquet/src/file/page_index/index.rs b/parquet/src/file/page_index/index.rs
index 5c0a7df84..45381234c 100644
--- a/parquet/src/file/page_index/index.rs
+++ b/parquet/src/file/page_index/index.rs
@@ -48,6 +48,10 @@ impl<T> PageIndex<T> {
#[derive(Debug, Clone, PartialEq)]
pub enum Index {
+ /// Sometimes reading page index from parquet file
+ /// will only return pageLocations without min_max index,
+ /// `NONE` represents this lack of index information
+ NONE,
BOOLEAN(BooleanIndex),
INT32(NativeIndex<i32>),
INT64(NativeIndex<i64>),
@@ -56,10 +60,6 @@ pub enum Index {
DOUBLE(NativeIndex<f64>),
BYTE_ARRAY(ByteArrayIndex),
FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
- /// Sometimes reading page index from parquet file
- /// will only return pageLocations without min_max index,
- /// `None` represents this lack of index information
- None,
}
/// An index of a column of [`Type`] physical representation
diff --git a/parquet/src/file/page_index/index_reader.rs b/parquet/src/file/page_index/index_reader.rs
index 616502139..33499e742 100644
--- a/parquet/src/file/page_index/index_reader.rs
+++ b/parquet/src/file/page_index/index_reader.rs
@@ -138,7 +138,7 @@ fn deserialize_column_index(
column_type: Type,
) -> Result<Index, ParquetError> {
if data.is_empty() {
- return Ok(Index::None);
+ return Ok(Index::NONE);
}
let mut d = Cursor::new(data);
let mut prot = TCompactInputProtocol::new(&mut d);
diff --git a/parquet/src/file/serialized_reader.rs b/parquet/src/file/serialized_reader.rs
index d3f5d7127..c0f7c3926 100644
--- a/parquet/src/file/serialized_reader.rs
+++ b/parquet/src/file/serialized_reader.rs
@@ -1257,7 +1257,7 @@ mod tests {
};
//col11->timestamp_col: INT96 UNCOMPRESSED DO:0 FPO:490093 SZ:111948/111948/1.00 VC:7300 ENC:BIT_PACKED,RLE,PLAIN ST:[num_nulls: 0, min/max not defined]
//Notice: min_max values for each page for this col not exits.
- if let Index::None = &page_indexes[0][10] {
+ if let Index::NONE = &page_indexes[0][10] {
assert_eq!(row_group_offset_indexes[10].len(), 974);
} else {
unreachable!()