You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing a TSQL regex-match condition on a column with empty values can raise an error as these values are cast to None:
$ delphin select'i-id where error ~"lexical gap"' mrs/Traceback (most recent call last):[...] File "/home/mwg/repos/pydelphin/delphin/tsql.py", line 422, in func return re.search(body[1], value) File "/usr/local/lib/python3.6/re.py", line 182, in search return _compile(pattern, flags).search(string)TypeError: expected string or bytes-like object
The problem is that value (in tsql.py) is None. A similar error occurs when the query's datatype doesn't match the column's datatype (see #261) but this problem with None also occurs even when they do match.
Edit: changed the title and text because it occurs with other operators and datatypes (e.g, doing an inequality comparison on a missing :date value).
The text was updated successfully, but these errors were encountered:
goodmami
changed the title
TSQL regex-match conditions raise error on empty values
TSQL conditions raise error on empty values
Dec 20, 2019
Executing a TSQL
regex-matchcondition on a column with empty values can raise an error as these values are cast toNone
:The problem is that
value
(intsql.py
) isNone
. A similar error occurs when the query's datatype doesn't match the column's datatype (see #261) but this problem withNone
also occurs even when they do match.Edit: changed the title and text because it occurs with other operators and datatypes (e.g, doing an inequality comparison on a missing
:date
value).The text was updated successfully, but these errors were encountered: