TheYorouzoya opened a new pull request, #8092:
URL: https://github.com/apache/gravitino/pull/8092

   <!--
   1. Title: [#8034] Improvement: Fully support nullable simpleStrings in 
Types.java
   -->
   
   ### What changes were proposed in this pull request?
   
   This PR adds full support for nullable simpleStrings in 
`api/src/main/java/org/apache/gravitino/rel/types/Types.java`. More 
specifically, for the `simpleString()` method for the complex type `MapType`.
   Additionally, a couple of unit tests are added to cover the cases where 
`MapType` and `ListType` can have non-nullable fields in them.
   
   ### Why are the changes needed?
   
   It is important to indicate (in the human readable `simpleString()` output) 
whether an instantiated complex type like the `MapType` can or cannot have null 
values for its elements. In code, this is indicated by a `valueNullable` 
boolean field.
   For example, a `MapType` which maps each `IntegerType` to a `StringType` 
might not want to allow an `IntegerType->Null` mapping. In that case, a call to 
the `simpleString()` method should return the following string 
`map<integer,string, NOT NULL>` to indicate this behavior.
   
   
   Fix: #8034
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Locally, with the provided unit test in the original issue post. 
Additionally, since `ListType` also allows for a similar non-null behavior as 
indicated by the code, I've decided to add a test to cover it as well.
   Since the other two complex types either do not exhibit the behavior (in 
case of `UnionType`) or already have the behavior covered in a test (in case of 
`StructType`), no additional tests were added for the other complex types.


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