architjainjain commented on code in PR #6619:
URL: https://github.com/apache/hive/pull/6619#discussion_r3622907482


##########
serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java:
##########
@@ -543,11 +543,35 @@ private TypeInfo parseType() {
               break;
             }
           }
-          Token name = expect("name",">");
-          if (name.text.equals(">")) {
+          // Collect all consecutive tokens until ":" or ">" or "," as the 
field name.
+          // This handles struct field names that:
+          //   (a) start with a valid type-char token, e.g. "gpa_!@#$%^&*()" 
where "gpa_" is
+          //       the first token and "!", "@", ... are appended by the loop 
below, and
+          //   (b) start with a special character, e.g. "!@#$%^&*()_age" where 
"!" is first.
+          // Both cases arise when Iceberg partition column names contain 
special characters
+          // stored as bare (unquoted) strings in Iceberg metadata.
+          //
+          // NOTE: The following characters are NOT supported in bare 
(unquoted) struct field
+          // names as they are structural delimiters in the type grammar:
+          //   ":"  - separates field name from field type
+          //   ">"  - closes the struct definition
+          //   ","  - separates fields
+          // Field names containing these characters would require a quoting 
convention
+          // which is not currently implemented.
+          StringBuilder fieldNameBuilder = new StringBuilder();

Review Comment:
   done



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to