luoyuxia commented on code in PR #1575:
URL: https://github.com/apache/fluss/pull/1575#discussion_r2293294074


##########
fluss-flink/fluss-flink-common/src/main/java/com/alibaba/fluss/flink/source/enumerator/FlinkSourceEnumerator.java:
##########
@@ -242,29 +242,27 @@ public void start() {
                         this::checkPartitionChanges,
                         0,
                         scanPartitionDiscoveryIntervalMs);
+            } else if (streaming && !lakeEnabled && 
scanPartitionDiscoveryIntervalMs <= 0) {
+                // just call once
+                LOG.info(
+                        "Starting the FlussSourceEnumerator for table {} 
without partition discovery.",
+                        tablePath);
+                context.callAsync(this::listPartitions, 
this::checkPartitionChanges);
             } else {
-                if (!streaming) {
-                    startInBatchMode();
-                } else {
-                    // just call once
-                    LOG.info(
-                            "Starting the FlussSourceEnumerator for table {} 
without partition discovery.",
-                            tablePath);
-                    context.callAsync(this::listPartitions, 
this::checkPartitionChanges);
-                }
+                genHybridLakeAndFlussSplits();

Review Comment:
   If lake enable + scanPartitionDiscoveryIntervalMs > 0 + streaming,
   seems it won't discover new partitions? Right?
   But we still need to discover new partitions.



##########
fluss-flink/fluss-flink-common/src/main/java/com/alibaba/fluss/flink/source/enumerator/initializer/NoStoppingOffsetsInitializer.java:
##########
@@ -37,6 +37,6 @@ public Map<Integer, Long> getBucketOffsets(
             @Nullable String partitionName,
             Collection<Integer> buckets,
             OffsetsInitializer.BucketOffsetsRetriever bucketOffsetsRetriever) {
-        return Collections.emptyMap();
+        return buckets.stream().collect(Collectors.toMap(x -> x, x -> 
Long.MAX_VALUE));

Review Comment:
   Why change this?



##########
fluss-lake/fluss-lake-paimon/src/test/java/com/alibaba/fluss/lake/paimon/utils/FlinkRowAssertionsUtils.java:
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.alibaba.fluss.lake.paimon.utils;
+
+import org.apache.flink.table.api.TableEnvironment;
+import org.apache.flink.types.Row;
+import org.apache.flink.util.CloseableIterator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/** Utility class providing assertion methods for Flink test results. */
+public class FlinkRowAssertionsUtils {

Review Comment:
   Do we really need to create a new  `FlinkRowAssertionsUtils`? Can we re-use 
the existing test utils?



##########
fluss-lake/fluss-lake-paimon/src/test/java/com/alibaba/fluss/lake/paimon/flink/FlinkUnionReadLogTableITCase.java:
##########
@@ -97,6 +99,43 @@ void testReadLogTableFullType(boolean isPartitioned) throws 
Exception {
         assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
     }
 
+    @ParameterizedTest
+    @ValueSource(booleans = {false, true})
+    void testReadLogTableInStreamingMode(boolean isPartitioned) throws 
Exception {
+        // first of all, start tiering
+        JobClient jobClient = buildTieringJob(execEnv);
+
+        String tableName = "logTable_" + (isPartitioned ? "partitioned" : 
"non_partitioned");

Review Comment:
   the table has same name with tables in method `testReadLogTableFullType`, 
I'm afraid of there will be conflicts. I suggest you to use a new name.



-- 
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