Skip to content

Commit

Permalink
[bugfix] Fix table min_partitions (#5697)
Browse files Browse the repository at this point in the history
Fixes #5603
  • Loading branch information
tpoterba authored and danking committed Mar 26, 2019
1 parent daed180 commit cf738c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hail/python/hail/ir/table_reader.py
Expand Up @@ -43,7 +43,7 @@ def __init__(self, paths, min_partitions, types, comment,
'missing': missing,
'noHeader': no_header,
'impute': impute,
'nPartitions': min_partitions,
'nPartitionsOpt': min_partitions,
'quoteStr': quote,
'skipBlankLines': skip_blank_lines,
'forceBGZ': force_bgz,
Expand Down
2 changes: 2 additions & 0 deletions hail/python/test/hail/table/test_table.py
Expand Up @@ -688,6 +688,8 @@ def test_write_stage_locally(self):
t2 = hl.read_table(f)
self.assertTrue(t._same(t2))

def test_min_partitions(self):
assert hl.import_table(resource('variantAnnotations.tsv'), min_partitions=50).n_partitions() == 50

def test_read_back_same_as_exported(self):
t, _ = create_all_values_datasets()
Expand Down

0 comments on commit cf738c3

Please sign in to comment.