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 2021/12/07 01:56:23 UTC

[GitHub] [hudi] XuQianJin-Stars commented on a change in pull request #4193: [HUDI-2915] Fix field not found error for sparksql

XuQianJin-Stars commented on a change in pull request #4193:
URL: https://github.com/apache/hudi/pull/4193#discussion_r763568655



##########
File path: hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
##########
@@ -454,6 +457,10 @@ public static String getNestedFieldValAsString(GenericRecord record, String fiel
    * Obtain value of the provided field, denoted by dot notation. e.g: a.b.c
    */
   public static Object getNestedFieldVal(GenericRecord record, String fieldName, boolean returnNullIfNotFound) {
+    if (StringUtils.isNullOrEmpty(fieldName.trim())) {

Review comment:
       > 
   
   For the sake of logical robustness, to prevent users from calling this method function, passing in vacancy will cause an error.




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