2 ms·
@chdb_udf() def split_part(s, sep, idx): idx = int(idx)-1 return s.split(sep)[idx] second = chdb.query("select split_part('a;b;c',
by amluto 3y ago
@chdb_udf()
def split_part(s, sep, idx):
idx = int(idx)-1
return s.split(sep)[idx]
second = chdb.query("select split_part('a;b;c', ';', 2)")
Is there some reason that registration of a UDF deserves to be global?