You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/08/13 17:38:52 UTC

[GitHub] [incubator-iceberg] xabriel commented on a change in pull request #372: Allow read split behavior overrides

xabriel commented on a change in pull request #372: Allow read split behavior overrides
URL: https://github.com/apache/incubator-iceberg/pull/372#discussion_r313525003
 
 

 ##########
 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:
   Do you mean to not accept, say, `read.split.target-size` in favor of `split-size`, or that  we should accept both?
   
   Re updating the docs, will do.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org