rdblue commented on a change in pull request #372: Allow read split behavior
overrides
URL: https://github.com/apache/incubator-iceberg/pull/372#discussion_r313520937
##########
File path: core/src/main/java/org/apache/iceberg/BaseTableScan.java
##########
@@ -176,11 +188,26 @@ public Expression filter() {
@Override
public CloseableIterable<CombinedScanTask> planTasks() {
- long splitSize = targetSplitSize(ops);
- int lookback = ops.current().propertyAsInt(
- TableProperties.SPLIT_LOOKBACK,
TableProperties.SPLIT_LOOKBACK_DEFAULT);
- long openFileCost = ops.current().propertyAsLong(
- TableProperties.SPLIT_OPEN_FILE_COST,
TableProperties.SPLIT_OPEN_FILE_COST_DEFAULT);
+ long splitSize;
+ if (splitOptions != null && splitOptions.getSplitSize() != null) {
+ splitSize = splitOptions.getSplitSize();
+ } else {
+ splitSize = targetSplitSize(ops);
+ }
+ int lookback;
+ if (splitOptions != null && splitOptions.getSplitLookback() != null) {
+ lookback = splitOptions.getSplitLookback();
+ } else {
+ lookback = ops.current().propertyAsInt(
+ TableProperties.SPLIT_LOOKBACK,
TableProperties.SPLIT_LOOKBACK_DEFAULT);
Review comment:
Actually, "snapshot-id" is a read option, not a write option:
http://iceberg.apache.org/configuration/#read-options
Not sure how I missed that. Anyway, I think we've set a precedent that we
should use shorter option names for interactive cases like this, instead of
full config names.
Could you also update the read options table?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]