diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2022-09-17 14:55:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-09-17 14:55:04 +0000 |
| commit | 2ba8bf01ea85a8802ab8638eee72cfc1af2b260c (patch) | |
| tree | c5f913aa8cd8e41c5d22d614edae406288129877 /lib/sqlalchemy/sql | |
| parent | f0bcd57f9ed76ba8d871448d821a85089f490b6c (diff) | |
| parent | 02fe382d6bfc5e8ccab6e2024a5241379a02b7e0 (diff) | |
| download | sqlalchemy-2ba8bf01ea85a8802ab8638eee72cfc1af2b260c.tar.gz | |
Merge "Improve array_agg and Array processing" into main
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/functions.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/sqltypes.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index a028e7fed..c04f5fa1d 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -1407,7 +1407,9 @@ class array_agg(GenericFunction[_T]): if isinstance(type_from_args, sqltypes.ARRAY): kwargs["type_"] = type_from_args else: - kwargs["type_"] = default_array_type(type_from_args) + kwargs["type_"] = default_array_type( + type_from_args, dimensions=1 + ) kwargs["_parsed_args"] = fn_args super(array_agg, self).__init__(*fn_args, **kwargs) diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index fd52ec6ea..414ff03c3 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -3065,6 +3065,8 @@ class ARRAY( dim - 1 if dim is not None else None, collection_callable, ) + if x is not None + else None for x in arr ) |
