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

 ##########
 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:
   Went with short option names for the Spark `Reader`, but full property name 
when passed to the `TableScan` object. Let me know if this matches the 
precedent?

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