diff --git a/tests/pytest/util/autogen.py b/tests/pytest/util/autogen.py index 5c6445da7d3b05e8190480304cebe447c79776e6..b85348d0ba36a026e9400ece76e18de54185aeee 100644 --- a/tests/pytest/util/autogen.py +++ b/tests/pytest/util/autogen.py @@ -51,10 +51,7 @@ class AutoGen: metas = [] for i in range(cnt): colname = f"{pre}{i}" - if i < len(types): - sel = i - else: - sel = random.randint(0, len(types)-1) + sel = len(types) % len(types) coltype = types[sel] sql = f"{colname} {coltype}" if sqls != "":