Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/main/thrift/parquet.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,47 @@ struct ColumnMetaData {
* This information can be used to determine if all data pages are
* dictionary encoded for example **/
13: optional list<PageEncodingStats> encoding_stats;

/** Byte offset from beginning of file to Bloom filter data. **/
14: optional i64 bloom_filter_offset;
}

/** Block-based algorithm type annotation. **/
struct SplitBlockAlgorithm {}

/** The algorithm used in Bloom filter. **/
union BloomFilterAlgorithm {
/** Block-based Bloom filter. **/
1: SplitBlockAlgorithm BLOCK;
}

/** Hash strategy type annotation. It uses Murmur3Hash_x64_128 from the original SMHasher
* repo by Austin Appleby.
**/
struct Murmur3 {}

/**
* The hash function used in Bloom filter. This function takes the hash of a column value
* using plain encoding.
**/
union BloomFilterHash {
/** Murmur3 Hash Strategy. **/
1: Murmur3 MURMUR3;
}

/**
* Bloom filter header is stored at beginning of Bloom filter data of each column
* and followed by its bitset.
**/
struct BloomFilterHeader {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also need a mention in PageType and PageHeader?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to remind again.

It depends on how we treat Bloom filter data, it is natural if we abstract Bloom filter data as a specific page. Previously, I didn't read or write it as page since the PageReader/PageWriter APIs in parquet-mr looks specific to data and dictionary page. While I think it is easy to integrate if we want to do this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/** The size of bitset in bytes **/
1: required i32 numBytes;

/** The algorithm for setting bits. **/
2: required BloomFilterAlgorithm algorithm;

/** The hash function used for Bloom filter. **/
3: required BloomFilterHash hash;
}

struct ColumnChunk {
Expand Down