nsivabalan commented on code in PR #5427:
URL: https://github.com/apache/hudi/pull/5427#discussion_r858106552


##########
hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/InternalSchemaUtils.java:
##########
@@ -54,13 +58,16 @@ private InternalSchemaUtils() {
    */
   public static InternalSchema pruneInternalSchema(InternalSchema schema, 
List<String> names) {
     // do check
-    List<Integer> prunedIds = names.stream().map(name -> {
-      int id = schema.findIdByName(name);
-      if (id == -1) {
-        throw new IllegalArgumentException(String.format("cannot prune col: %s 
which not exisit in hudi table", name));
-      }
-      return id;
-    }).collect(Collectors.toList());
+    List<Integer> prunedIds = names.stream()
+        .filter(name -> {
+          int id = schema.findIdByName(name);

Review Comment:
   can you help me understand something. I understand if non existant 
preCombine is part of the names, we ignore it. 
   But if someone does a query "select a,b,c from tbl", where b does not even 
exist in the table, we have to throw exception. Can you confirm that is not 
affected by this fix here. 
   



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