Revision 4938
Added by Aaron Marcuse-Kubitza about 12 years ago
sql_gen.py | ||
---|---|---|
989 | 989 |
|
990 | 990 |
class EnsureNotNull(Coalesce): |
991 | 991 |
def __init__(self, value, type_): |
992 |
Coalesce.__init__(self, as_Col(value), |
|
993 |
Cast(type_, null_sentinels[type_])) |
|
992 |
if isinstance(type_, ArrayType): null = [] |
|
993 |
else: null = null_sentinels[type_] |
|
994 |
Coalesce.__init__(self, as_Col(value), Cast(type_, null)) |
|
994 | 995 |
|
995 | 996 |
self.type = type_ |
996 | 997 |
|
Also available in: Unified diff
sql_gen.py: EnsureNotNull: Support ArrayType types