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

 ##########
 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:
   On the write path, we decided to go with easier to remember option names, 
like "snapshot-id" and "write-format", to be less verbose. What do you think 
about doing that here? This could be "lookback", "split-size", and 
"file-open-cost".

----------------------------------------------------------------
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]

Reply via email to