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 2026/07/15 00:06:59 UTC
(paimon) branch master updated: [flink] Fix scan.partitions error message placeholder in PartitionLoader (#8608)
This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new c2e3a76196 [flink] Fix scan.partitions error message placeholder in PartitionLoader (#8608)
c2e3a76196 is described below
commit c2e3a76196e6b5010846edc67a9d65c58cd5a91e
Author: Eunbin Son <58...@users.noreply.github.com>
AuthorDate: Wed Jul 15 09:06:54 2026 +0900
[flink] Fix scan.partitions error message placeholder in PartitionLoader (#8608)
---
.../org/apache/paimon/flink/lookup/PartitionLoader.java | 2 +-
.../flink/lookup/DynamicPartitionLevelLoaderTest.java | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/PartitionLoader.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/PartitionLoader.java
index 638e5254c7..49d236a693 100644
--- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/PartitionLoader.java
+++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/PartitionLoader.java
@@ -91,7 +91,7 @@ public abstract class PartitionLoader implements Serializable {
Preconditions.checkArgument(
!table.partitionKeys().isEmpty(),
- "{} is not supported for non-partitioned table.",
+ "%s is not supported for non-partitioned table.",
FlinkConnectorOptions.SCAN_PARTITIONS.key());
int maxPartitionNum = -1;
diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/lookup/DynamicPartitionLevelLoaderTest.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/lookup/DynamicPartitionLevelLoaderTest.java
index 916ed69060..cc54a394de 100644
--- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/lookup/DynamicPartitionLevelLoaderTest.java
+++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/lookup/DynamicPartitionLevelLoaderTest.java
@@ -199,6 +199,22 @@ public class DynamicPartitionLevelLoaderTest {
commit.close();
}
+ @Test
+ public void testScanPartitionsOnNonPartitionedTable() throws Exception {
+ table =
+ createFileStoreTable(
+ Collections.emptyList(), Collections.emptyList(), Collections.emptyMap());
+
+ Map<String, String> customOptions = new HashMap<>();
+ customOptions.put(FlinkConnectorOptions.SCAN_PARTITIONS.key(), "max_pt()");
+ table = table.copy(customOptions);
+
+ assertThatCode(() -> PartitionLoader.of(table))
+ .hasMessage(
+ FlinkConnectorOptions.SCAN_PARTITIONS.key()
+ + " is not supported for non-partitioned table.");
+ }
+
private FileStoreTable createFileStoreTable(
List<String> partitionKeys, List<String> primaryKeys, Map<String, String> customOptions)
throws Exception {