Skip to content

Commit

Permalink
[Benchmark] Adapt data generation of integer columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucagretscher committed Jun 19, 2023
1 parent f36f51a commit 82788c4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions benchmark/operators/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,7 @@ def gen_random_int_values(smallest :int, largest :int, num :int):
if largest - smallest == num:
return list(range(smallest, largest))

taken = set()
counter = largest - num
values = list()

for i in range(0, num):
val = random.randrange(smallest, largest - num)
if val in taken:
values.append(counter)
counter += 1
else:
taken.add(val)
values.append(val)

assert len(values) == len(set(values))
return values
return random.sample(range(smallest, largest), k=num)


#=======================================================================================================================
Expand Down

0 comments on commit 82788c4

Please sign in to comment.