beryllw commented on code in PR #1732:
URL: https://github.com/apache/fluss/pull/1732#discussion_r2366497772


##########
fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/source/PaimonSplitPlannerTest.java:
##########
@@ -78,4 +79,37 @@ void testPlan() throws Exception {
                                 .map(PaimonSplit::dataSplit)
                                 .collect(Collectors.toList()));
     }
+
+    @Test
+    void testPlannerCreatesCorrectSplitsForLogTableWithoutBucketKey() throws 
Exception {
+        // 测试没有bucket key的log表
+        String tableName = "planner_log_table_without_bucket_key";
+        TablePath tablePath = TablePath.of(DEFAULT_DB, tableName);
+
+        Schema.Builder builder =
+                Schema.newBuilder()
+                        .column("id", DataTypes.INT())
+                        .column("message", DataTypes.STRING());
+        createTable(tablePath, builder.build());
+        Table table = getTable(tablePath);
+
+        List<InternalRow> records =
+                Arrays.asList(
+                        GenericRow.of(1, BinaryString.fromString("msg1")),
+                        GenericRow.of(2, BinaryString.fromString("msg2")));
+        writeRecord(tablePath, records);
+
+        Snapshot snapshot = table.latestSnapshot().get();
+
+        LakeSource<PaimonSplit> lakeSource = 
lakeStorage.createLakeSource(tablePath);
+        List<PaimonSplit> paimonSplits = 
lakeSource.createPlanner(snapshot::id).plan();
+
+        List<Split> actualSplits = ((FileStoreTable) 
table).newScan().plan().splits();

Review Comment:
   Why should we need to get actual paimon splits `actualSplits`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to