singhpk234 commented on code in PR #12856: URL: https://github.com/apache/iceberg/pull/12856#discussion_r2054452974
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java: ########## @@ -138,24 +167,32 @@ public InputPartition[] planInputPartitions(Offset start, Offset end) { "Invalid start offset: %s is not a StreamingOffset", start); - if (end.equals(StreamingOffset.START_OFFSET)) { + StreamingOffset startOffset = (StreamingOffset) start; + StreamingOffset endOffset = (StreamingOffset) end; + + if (endOffset.equals(StreamingOffset.START_OFFSET)) { + LOG.debug("End offset is START_OFFSET, returning no partitions"); return new InputPartition[0]; } - StreamingOffset endOffset = (StreamingOffset) end; - StreamingOffset startOffset = (StreamingOffset) start; - List<FileScanTask> fileScanTasks = planFiles(startOffset, endOffset); + FileScanTaskSummary taskSummary = new FileScanTaskSummary(fileScanTasks); + LOG.debug( + "planFiles returned {} file scan tasks. total_files={}, total_size_in_bytes={}. Time taken to eval stats {} ms", + fileScanTasks.size(), + taskSummary.nrOfFiles, + taskSummary.sizeInBytes, + taskSummary.evalTimeTakenMs); CloseableIterable<FileScanTask> splitTasks = TableScanUtil.splitFiles(CloseableIterable.withNoopClose(fileScanTasks), splitSize); List<CombinedScanTask> combinedScanTasks = Lists.newArrayList( TableScanUtil.planTasks(splitTasks, splitSize, splitLookback, splitOpenFileCost)); - String[][] locations = computePreferredLocations(combinedScanTasks); + LOG.debug("Split into {} combined scan tasks", combinedScanTasks.size()); Review Comment: ya was asking to use the `CombinedScanTask.class.getName()` to make it future proof to any scan task refactor. -- 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. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org