You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/04 11:31:35 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #5937: [HUDI-4298] When reading the mor table with QUERY_TYPE_SNAPSHOT,Unabl…

danny0405 commented on code in PR #5937:
URL: https://github.com/apache/hudi/pull/5937#discussion_r909621274


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/utils/TestWriteBase.java:
##########
@@ -425,4 +425,19 @@ protected String lastCompleteInstant() {
           : TestUtils.getLastCompleteInstant(basePath, HoodieTimeline.COMMIT_ACTION);
     }
   }
+
+  private static List<RowData> readData(InputFormat inputFormat) throws IOException {
+    InputSplit[] inputSplits = inputFormat.createInputSplits(1);

Review Comment:
   Where is this method used ?



##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/utils/TestUtils.java:
##########
@@ -70,6 +70,16 @@ public static String getLastDeltaCompleteInstant(String basePath) {
         .orElse(null);
   }
 
+  public static String getLastCompletedCommitInstants(String basePath) {
+    final HoodieTableMetaClient metaClient = HoodieTableMetaClient.builder()

Review Comment:
   Can we use `getLastCompleteInstant(String basePath, String commitAction)` here ?



##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/utils/TestData.java:
##########
@@ -638,49 +657,92 @@ public static void checkWrittenFullData(
    *
    * <p>Note: Replace it with the Flink reader when it is supported.
    *
-   * @param fs            The file system
-   * @param latestInstant The latest committed instant of current table
-   * @param baseFile      The file base to check, should be a directory
-   * @param expected      The expected results mapping, the key should be the partition path
-   * @param partitions    The expected partition number
-   * @param schema        The read schema
+   * @param fs         The file system
+   * @param baseFile   The file base to check, should be a directory
+   * @param expected   The expected results mapping, the key should be the partition path
+   * @param partitions The expected partition number
+   * @param schema     The read schema
+   * @param conf       The conf of write
    */
   public static void checkWrittenDataMOR(
-      FileSystem fs,
-      String latestInstant,
-      File baseFile,
-      Map<String, String> expected,
-      int partitions,
-      Schema schema) {
+          FileSystem fs,
+          File baseFile,
+          Map<String, String> expected,

Review Comment:
   Your indentation seems not right, if you use the IDEA, you can import the style file manually if you installed the checkstyle plugin.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org