You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "voonhous (via GitHub)" <gi...@apache.org> on 2023/04/20 05:17:07 UTC

[GitHub] [hudi] voonhous commented on a diff in pull request #8501: [HUDI-6103] Validate required columns when fetching required positions

voonhous commented on code in PR #8501:
URL: https://github.com/apache/hudi/pull/8501#discussion_r1172090557


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/mor/MergeOnReadTableState.java:
##########
@@ -85,7 +86,7 @@ public int getOperationPos() {
   public int[] getRequiredPositions() {
     final List<String> fieldNames = rowType.getFieldNames();
     return requiredRowType.getFieldNames().stream()
-        .map(fieldNames::indexOf)
+        .map(f -> getIdxOfFieldOrElseThrow(f, fieldNames))
         .mapToInt(i -> i)

Review Comment:
   Hmmm, from our experience, it happens quite often when user is submitting a streaming job. 
    



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