mrhhsg commented on code in PR #63528:
URL: https://github.com/apache/doris/pull/63528#discussion_r3314550562


##########
be/src/core/data_type_serde/complex_type_deserialize_util.h:
##########
@@ -78,13 +79,32 @@ struct ComplexTypeDeserializeUtil {
 
     static bool is_null_string(const StringRef& str) {
         if (str.size == 4) {
-            // null
-            return str.data[0] == 'n' && str.data[1] == 'u' && str.data[2] == 
'l' &&
-                   str.data[3] == 'l';
+            // SQL NULL literal is case-insensitive.
+            return (str.data[0] == 'n' || str.data[0] == 'N') &&
+                   (str.data[1] == 'u' || str.data[1] == 'U') &&
+                   (str.data[2] == 'l' || str.data[2] == 'L') &&
+                   (str.data[3] == 'l' || str.data[3] == 'L');
         }
         return false;
     }
 
+    static Status process_field(const DataTypeSerDeSPtr& serde, StringRef str, 
Field& field) {
+        str = str.trim_whitespace();
+        if (is_null_string(str)) {

Review Comment:
   Addressed in 53e810560aa. `ComplexTypeDeserializeUtil::process_field()` now 
only accepts an explicit nested `NULL` when the nested serde is 
`DataTypeNullableSerDe`; non-nullable nested fields return an invalid default 
error during parsing. Added BE unit coverage for a non-nullable struct field 
default containing `NULL`. Current SQL grammar does not expose struct-field 
`NOT NULL` in this path, so the coverage constructs a non-nullable 
`DataTypeStruct` directly.



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