justinmclean opened a new issue, #8159:
URL: https://github.com/apache/gravitino/issues/8159

   ### What would you like to be improved?
   
   The CLI can support parsing of more complex types e.g. maps contain maps or 
lists.
   
   Here are some tests to help:
   ```
     @Test
     public void testParseTypeNestedList() {
       Type type = ParseType.toType("list(list(integer))");
       assertThat(type, instanceOf(Types.ListType.class));
       Type innerList = ((Types.ListType) type).elementType();
       assertThat(innerList, instanceOf(Types.ListType.class));
       Type elementType = ((Types.ListType) innerList).elementType();
       assertThat(elementType, instanceOf(Types.IntegerType.class));
     }
   
     @Test
     public void testParseTypeMapWithNestedValue() {
       Type type = ParseType.toType("map(string,list(integer))");
       assertThat(type, instanceOf(Types.MapType.class));
       Type keyType = ((Types.MapType) type).keyType();
       Type valueType = ((Types.MapType) type).valueType();
       assertThat(keyType, instanceOf(Types.StringType.class));
       assertThat(valueType, instanceOf(Types.ListType.class));
       Type elementType = ((Types.ListType) valueType).elementType();
       assertThat(elementType, instanceOf(Types.IntegerType.class));
     }
   ```
   
   ### How should we improve?
   
   Not while this might seem at first complex, it is very simple to do and only 
requires changing a couple of lines of code.


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