Skip to content
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

Orc: Support row group bloom filters #5313

Merged
merged 5 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix constants
  • Loading branch information
a49a committed Oct 20, 2022
commit e2b1212699b870506e158722e481e2b911ed620c
3 changes: 2 additions & 1 deletion core/src/main/java/org/apache/iceberg/TableProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ private TableProperties() {}
public static final String ORC_STRIPE_SIZE_BYTES = "write.orc.stripe-size-bytes";

public static final String ORC_BLOOM_FILTER_COLUMNS = "write.orc.bloom.filter.columns";
public static final String ORC_BLOOM_FILTER_COLUMNS_DEFAULT = "";

public static final String ORC_BLOOM_FILTER_FPP = "write.orc.bloom.filter.fpp";
public static final double BLOOM_FILTER_FPP_DEFAULT = 0.05;
public static final double ORC_BLOOM_FILTER_FPP_DEFAULT = 0.05;

public static final String DELETE_ORC_STRIPE_SIZE_BYTES = "write.delete.orc.stripe-size-bytes";
public static final long ORC_STRIPE_SIZE_BYTES_DEFAULT = 64L * 1024 * 1024; // 64 MB
Expand Down
10 changes: 7 additions & 3 deletions orc/src/main/java/org/apache/iceberg/orc/ORC.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.iceberg.orc;

import static org.apache.iceberg.TableProperties.BLOOM_FILTER_FPP_DEFAULT;
import static org.apache.iceberg.TableProperties.DELETE_ORC_BLOCK_SIZE_BYTES;
import static org.apache.iceberg.TableProperties.DELETE_ORC_COMPRESSION;
import static org.apache.iceberg.TableProperties.DELETE_ORC_COMPRESSION_STRATEGY;
Expand All @@ -27,7 +26,9 @@
import static org.apache.iceberg.TableProperties.ORC_BLOCK_SIZE_BYTES;
import static org.apache.iceberg.TableProperties.ORC_BLOCK_SIZE_BYTES_DEFAULT;
import static org.apache.iceberg.TableProperties.ORC_BLOOM_FILTER_COLUMNS;
import static org.apache.iceberg.TableProperties.ORC_BLOOM_FILTER_COLUMNS_DEFAULT;
import static org.apache.iceberg.TableProperties.ORC_BLOOM_FILTER_FPP;
import static org.apache.iceberg.TableProperties.ORC_BLOOM_FILTER_FPP_DEFAULT;
import static org.apache.iceberg.TableProperties.ORC_COMPRESSION;
import static org.apache.iceberg.TableProperties.ORC_COMPRESSION_DEFAULT;
import static org.apache.iceberg.TableProperties.ORC_COMPRESSION_STRATEGY;
Expand Down Expand Up @@ -306,13 +307,16 @@ static Context dataContext(Map<String, String> config) {
CompressionStrategy compressionStrategy = toCompressionStrategy(strategyAsString);

String bloomFilterColumns =
PropertyUtil.propertyAsString(config, OrcConf.BLOOM_FILTER_COLUMNS.getAttribute(), "");
PropertyUtil.propertyAsString(
config,
OrcConf.BLOOM_FILTER_COLUMNS.getAttribute(),
ORC_BLOOM_FILTER_COLUMNS_DEFAULT);
bloomFilterColumns =
PropertyUtil.propertyAsString(config, ORC_BLOOM_FILTER_COLUMNS, bloomFilterColumns);

double bloomFilterFpp =
PropertyUtil.propertyAsDouble(
config, OrcConf.BLOOM_FILTER_FPP.getAttribute(), BLOOM_FILTER_FPP_DEFAULT);
config, OrcConf.BLOOM_FILTER_FPP.getAttribute(), ORC_BLOOM_FILTER_FPP_DEFAULT);
bloomFilterFpp =
PropertyUtil.propertyAsDouble(config, ORC_BLOOM_FILTER_FPP, bloomFilterFpp);
Preconditions.checkArgument(
Expand Down