Skip to content

Conversation

@patrick-schultz
Copy link
Member

@patrick-schultz patrick-schultz commented Feb 11, 2022

Fixes #11335.

@tpoterba made the replicating test, with that it was easy to find the source of the bug.

The error was in

pkPartitioned
  .strictify()
  ...
  .changePartitionerNoRepartition(partitioner.extendKeySamePartitions(keyType))

where pkPartitioned is keyed by the partition key. In the test case, all rows have the same partition key, so the partitioner looks like [x, x], [x, x], .... In that case, strictify correctly collapses all those partitions into one, but partitioner.extendKeySamePartitions(keyType) tries to extend the key type without changing the partitioning, which in this case creates an invalid partitioner.

The fix is to use pkPartitioned.extendKeyPreservesPartitioning(key), which does the strictify and creates the correct partitioner.

@danking danking merged commit 2d01933 into hail-is:main Feb 14, 2022
@patrick-schultz patrick-schultz deleted the tracked/failing-lowered-vcf branch February 14, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lowered table coercers construct invalid partitioners with prefix-sorted mode

4 participants