You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/03/28 11:52:01 UTC
[incubator-paimon] branch master updated: [hotfix] Minor fix to TableScan.plan non-null (#724)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 3944c7e53 [hotfix] Minor fix to TableScan.plan non-null (#724)
3944c7e53 is described below
commit 3944c7e53fc650d5f704229260dbfd567dd57cea
Author: Jingsong Lee <ji...@gmail.com>
AuthorDate: Tue Mar 28 19:51:55 2023 +0800
[hotfix] Minor fix to TableScan.plan non-null (#724)
---
.../org/apache/paimon/table/source/snapshot/StartingScanner.java | 3 +++
.../apache/paimon/flink/source/ContinuousFileSplitEnumerator.java | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/paimon-core/src/main/java/org/apache/paimon/table/source/snapshot/StartingScanner.java b/paimon-core/src/main/java/org/apache/paimon/table/source/snapshot/StartingScanner.java
index 2bedd924a..e0be16c6e 100644
--- a/paimon-core/src/main/java/org/apache/paimon/table/source/snapshot/StartingScanner.java
+++ b/paimon-core/src/main/java/org/apache/paimon/table/source/snapshot/StartingScanner.java
@@ -23,6 +23,8 @@ import org.apache.paimon.table.source.DataSplit;
import org.apache.paimon.table.source.StreamDataTableScan;
import org.apache.paimon.utils.SnapshotManager;
+import javax.annotation.Nullable;
+
import java.util.Collections;
import java.util.List;
@@ -32,6 +34,7 @@ import java.util.List;
*/
public interface StartingScanner {
+ @Nullable
Result scan(SnapshotManager snapshotManager, SnapshotSplitReader snapshotSplitReader);
/** Scan result of {@link #scan}. */
diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/ContinuousFileSplitEnumerator.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/ContinuousFileSplitEnumerator.java
index 4bdf75f7f..0eae09631 100644
--- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/ContinuousFileSplitEnumerator.java
+++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/ContinuousFileSplitEnumerator.java
@@ -163,11 +163,12 @@ public class ContinuousFileSplitEnumerator
return;
}
- if (plan == null) {
+ nextSnapshotId = scan.checkpoint();
+
+ if (plan.splits().isEmpty()) {
return;
}
- nextSnapshotId = scan.checkpoint();
addSplits(splitGenerator.createSplits(plan));
assignSplits();
}