justinmclean opened a new issue, #7707:
URL: https://github.com/apache/gravitino/issues/7707
### What would you like to be improved?
Fix the parsing of whitespace correctly in list and map types in the CLI.
Here's some tests that should help:
```
@Test
public void testParseTypeListWithSpaces() {
Type type = ParseType.toType("list( integer )");
assertThat(type, instanceOf(Types.ListType.class));
Type elementType = ((Types.ListType) type).elementType();
assertThat(elementType, instanceOf(Types.IntegerType.class));
}
@Test
public void testParseTypeMapWithSpaces() {
Type type = ParseType.toType("map( string , 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.IntegerType.class));
}
```
### How should we improve?
Improve parsing to handle/ignore spaces.
--
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]