Closed jackharrhy closed 1 year ago
@vincentsarago if you'd like a test for this let me know and i can do that as well :)
Thanks @jackharrhy
if you'd like a test for this let me know and i can do that as well :)
Yes please 🙏
I might be missing something, but I don't see how this is doing anything differently than parameters=table.get("parameters", [])
?
@bitner because I guess table
can have parameters=None
.
Maybe this tell us there is a bug and that parameters should always default to []
or not be set in table if empty
@bitner
Maybe this tell us there is a bug and that parameters should always default to [] or not be set in table if empty
This is what table
look like
{'name': 'test', 'entity': 'Function', 'schema': 'public', 'parameters': None, 'properties': [{'name': 'foo', 'type': 'integer'}, {'name': 'location', 'type': 'geometry', 'geometry_type': 'Geometry'}]}
You can see that tipg_catalog
function returns None
for parameters
I have updated the code and added tests. @bitner I think we don't need to change the tipg_catalog
SQL code to return []
by default for now!
Thanks for taking this over and getting it sorted!
What I am changing
How I did it
parameters: None
properly, always default to a list to make pydantic happyHow you can test it
Create the following function
Currently
Launching tipg will fail when it goes to create an instance of Collection based off of this function due to a validation error
After this PR
Launching tipg will work as expected without any validation errors