Open
Description
Let's say we have my_table.my_numeric
being of numeric type.
From this query
SELECT my_numeric FROM my_table WHERE key = @key;
We have this function generated
def tmp(self, *, key: uuid.UUID) -> Optional[decimal.Decimal]:
But when a function like a sum is used
SELECT SUM(my_numeric) FROM my_table;
It's typed with an int
def tmp(self) -> Optional[int]:
Even though it actually returns a Decimal
Of course, explicit typing properly works
SELECT SUM(my_numeric)::numeric FROM my_table;
def tmp(self) -> Optional[decimal.Decimal]:
Metadata
Metadata
Assignees
Labels
No labels