From a49f44aaca5a1eb1ff87219e0651b426e6e54492 Mon Sep 17 00:00:00 2001 From: zhangbutao Date: Wed, 29 May 2024 12:10:06 +0800 Subject: [PATCH] Refine --- .../org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java index 5a38e98ad11a..ddd94bf4d5d6 100644 --- a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java +++ b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java @@ -218,7 +218,6 @@ public List getSplits(JobContext context) { } finally { workerPool.shutdown(); } - } private List planInputSplits(Table table, Configuration conf, ExecutorService workerPool) { @@ -230,10 +229,11 @@ private List planInputSplits(Table table, Configuration conf, Execut long fromVersion = conf.getLong(InputFormatConfig.SNAPSHOT_ID_INTERVAL_FROM, -1); Scan scan; if (fromVersion != -1) { - scan = applyConfig(conf, createIncrementalAppendScan(table, conf)).planWith(workerPool); + scan = applyConfig(conf, createIncrementalAppendScan(table, conf)); } else { - scan = applyConfig(conf, createTableScan(table, conf)).planWith(workerPool); + scan = applyConfig(conf, createTableScan(table, conf)); } + scan = (Scan) scan.planWith(workerPool); boolean allowDataFilesWithinTableLocationOnly = conf.getBoolean(HiveConf.ConfVars.HIVE_ICEBERG_ALLOW_DATAFILES_IN_TABLE_LOCATION_ONLY.varname,