Skip to content

Commit

Permalink
Showing 6 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -71,7 +71,12 @@ public boolean caseSensitive() {

public boolean localityEnabled() {
boolean defaultValue = Util.mayHaveBlockLocations(table.io(), table.location());
return PropertyUtil.propertyAsBoolean(readOptions, SparkReadOptions.LOCALITY, defaultValue);
return confParser
.booleanConf()
.option(SparkReadOptions.LOCALITY)
.sessionConf(SparkSQLProperties.LOCALITY)
.defaultValue(defaultValue)
.parse();
}

public Long snapshotId() {
Original file line number Diff line number Diff line change
@@ -63,4 +63,7 @@ private SparkSQLProperties() {}
// Controls the WAP branch used for write-audit-publish workflow.
// When set, new snapshots will be committed to this branch.
public static final String WAP_BRANCH = "spark.wap.branch";

// Controls whether to report locality information to Spark while allocating input partitions
public static final String LOCALITY = "spark.sql.iceberg.locality.enabled";
}
Original file line number Diff line number Diff line change
@@ -81,7 +81,12 @@ public boolean caseSensitive() {

public boolean localityEnabled() {
boolean defaultValue = Util.mayHaveBlockLocations(table.io(), table.location());
return PropertyUtil.propertyAsBoolean(readOptions, SparkReadOptions.LOCALITY, defaultValue);
return confParser
.booleanConf()
.option(SparkReadOptions.LOCALITY)
.sessionConf(SparkSQLProperties.LOCALITY)
.defaultValue(defaultValue)
.parse();
}

public Long snapshotId() {
Original file line number Diff line number Diff line change
@@ -74,4 +74,7 @@ private SparkSQLProperties() {}

// Overrides the delete planning mode
public static final String DELETE_PLANNING_MODE = "spark.sql.iceberg.delete-planning-mode";

// Controls whether to report locality information to Spark while allocating input partitions
public static final String LOCALITY = "spark.sql.iceberg.locality.enabled";
}
Original file line number Diff line number Diff line change
@@ -79,7 +79,12 @@ public boolean caseSensitive() {

public boolean localityEnabled() {
boolean defaultValue = Util.mayHaveBlockLocations(table.io(), table.location());
return PropertyUtil.propertyAsBoolean(readOptions, SparkReadOptions.LOCALITY, defaultValue);
return confParser
.booleanConf()
.option(SparkReadOptions.LOCALITY)
.sessionConf(SparkSQLProperties.LOCALITY)
.defaultValue(defaultValue)
.parse();
}

public Long snapshotId() {
Original file line number Diff line number Diff line change
@@ -67,4 +67,7 @@ private SparkSQLProperties() {}

// Overrides the advisory partition size
public static final String ADVISORY_PARTITION_SIZE = "spark.sql.iceberg.advisory-partition-size";

// Controls whether to report locality information to Spark while allocating input partitions
public static final String LOCALITY = "spark.sql.iceberg.locality.enabled";
}

0 comments on commit 506cdbf

Please sign in to comment.