diff --git a/tests/system-test/0-others/udfpy/sf_concat_nch.py b/tests/system-test/0-others/udfpy/sf_concat_nch.py index c64bfa8ad3a1e8482e09a7264cc4bff07701ecbc..84d8eb2c961c11282784f81b6206a36fba0f2edc 100644 --- a/tests/system-test/0-others/udfpy/sf_concat_nch.py +++ b/tests/system-test/0-others/udfpy/sf_concat_nch.py @@ -14,10 +14,14 @@ def process(block): for j in range(ncols): val = block.data(i, j) if val is None: - return [None] + row = None + break row.append(val.decode('utf_32_le')) - row_str = ''.join(row) - results.append(row_str.encode('utf_32_le')) + if row is None: + results.append(None) + else: + row_str = ''.join(row) + results.append(row_str.encode('utf_32_le')) return results diff --git a/tests/system-test/0-others/udfpy/sf_concat_var.py b/tests/system-test/0-others/udfpy/sf_concat_var.py index 0a63821aa72d431b49aea452b84347de27ecc054..fc8292c718d5c8def7cebc87ee7938b2c7bd3849 100644 --- a/tests/system-test/0-others/udfpy/sf_concat_var.py +++ b/tests/system-test/0-others/udfpy/sf_concat_var.py @@ -14,9 +14,13 @@ def process(block): for j in range(ncols): val = block.data(i, j) if val is None: - return [None] + row = None + break row.append(val.decode('utf-8')) - results.append(''.join(row)) + if row is None: + results.append(None) + else: + results.append(''.join(row)) return results diff --git a/tests/system-test/0-others/udfpy_main.py b/tests/system-test/0-others/udfpy_main.py index b4fd77f93a42e3dd74b314ecb55ef2407ddc0c4e..a2176a041ccaba16b0a59d4e094c992f6523cd94 100644 --- a/tests/system-test/0-others/udfpy_main.py +++ b/tests/system-test/0-others/udfpy_main.py @@ -73,7 +73,7 @@ class TDTestCase: 'col9': 'float', 'col10': 'double', 'col11': 'bool', - 'col12': 'varchar(20)', + 'col12': 'varchar(120)', 'col13': 'nchar(100)', } self.tag_dict = { @@ -88,7 +88,7 @@ class TDTestCase: 't9': 'float', 't10': 'double', 't11': 'bool', - 't12': 'varchar(20)', + 't12': 'varchar(120)', 't13': 'nchar(100)', } @@ -149,7 +149,7 @@ class TDTestCase: 'sf9': 'float', 'sf10': 'double', 'sf11': 'bool', - 'sf12': 'varchar(20)', + 'sf12': 'varchar(120)', 'sf13': 'nchar(100)' } # agg function @@ -165,7 +165,7 @@ class TDTestCase: 'af9': 'float', 'af10': 'double', 'af11': 'bool', - 'af12': 'varchar(20)', + 'af12': 'varchar(120)', 'af13': 'nchar(100)', 'af14': 'timestamp' } @@ -399,7 +399,7 @@ class TDTestCase: stable = "meters" tbname = "d" count = 3 - rows = 1000000 + rows = 1000 # do self.create_table(stable, tbname, count) self.insert_data(tbname, rows)