Skip to content

Commit

Permalink
Improve conversion of typenames to types
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed May 8, 2024
1 parent e9508a4 commit b90d55d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/substrait/sql/functions_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def arguments_type(self) -> list[SubstraitType | None]:
return [self._type_from_name(arg) for arg in self.arguments]

def _type_from_name(self, typename: str) -> SubstraitType | None:
# TODO: improve support complext type like LIST?<any>
typename, *_ = typename.split("<", 1)
typename = typename.lower()

nullable = False
if typename.endswith("?"):
nullable = True
Expand Down

0 comments on commit b90d55d

Please sign in to comment.