Skip to content

Commit

Permalink
[Datasets] Fix sort nightly test to skip stats() if exception is ra…
Browse files Browse the repository at this point in the history
…ised (#32329)
  • Loading branch information
c21 authored Feb 9, 2023
1 parent 5f0f95a commit 67d1515
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion release/nightly_tests/dataset/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ def make_block(count: int, num_columns: int) -> Block:
num_columns=1,
)
exc = None
ds_stats = None
try:
if args.shuffle:
ds = ds.random_shuffle()
else:
ds = ds.sort(key="c_0")
ds.fully_executed()
ds_stats = ds.stats()
except Exception as e:
exc = e
pass
Expand All @@ -143,7 +145,8 @@ def make_block(count: int, num_columns: int) -> Block:
print(traceback.format_exc())
print("")

print(ds.stats())
if ds_stats is not None:
print(ds_stats)

if "TEST_OUTPUT_JSON" in os.environ:
out_file = open(os.environ["TEST_OUTPUT_JSON"], "w")
Expand Down

0 comments on commit 67d1515

Please sign in to comment.