Correct handling of NULL values in user defined split_part function on SQLite
issue2370 review214001 (transplanted from 81d21490c70b90168877a7a5a7572330b84100f0)
This commit is contained in:
1 parent
6fda62bd80
commit
966079c1d5
1 file changed
+2
@@ -81,6 +81,8 @@ def date_trunc(_type, date):
|
||||
tm_tuple.tm_mday)
|
||||
|
||||
def split_part(text, delimiter, count):
|
||||
if text is None:
|
||||
return None
|
||||
return (text.split(delimiter) + [''] * (count - 1))[count - 1]
|
||||
|
||||
def replace(text, pattern, replacement):
|
||||
|
||||
Reference in new issue
Block a user