Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[query] Provide more informative error on tabix crash #9065

Merged
merged 1 commit into from Jul 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion hail/src/main/scala/is/hail/io/tabix/TabixReader.scala
Expand Up @@ -413,7 +413,9 @@ final class TabixLineIterator(
val curOff = getVirtualOffset
if (i < 0 || curOff == 0 || !TbiOrd.less64(curOff, offsets(i)._2)) { // jump to next chunk

if (i >= 0) assert(curOff == offsets(i)._2)
if (i >= 0 && curOff != offsets(i)._2)
throw new RuntimeException(s"error reading tabix-indexed file $filePath: " +
s"i=$i, curOff=$curOff, expected=${ offsets(i)._2 }")

if (i == offsets.length - 1) {
isEof = true
Expand Down