Skip to content

import_matrix_table can import matrix table with no cols#5723

Merged
danking merged 4 commits intohail-is:masterfrom
catoverdrive:import-mt-no-cols
Apr 2, 2019
Merged

import_matrix_table can import matrix table with no cols#5723
danking merged 4 commits intohail-is:masterfrom
catoverdrive:import-mt-no-cols

Conversation

@catoverdrive
Copy link
Copy Markdown
Contributor

Fixes #5718.

| Line:
| ${ line.truncate }""".stripMargin
)
off = addType(fieldTypes(ii))(line, rowNum, ii, off)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your test looks good. How does this change accomplish what you wanted? It looks like a simple reorder to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old way, we were checking that the line hadn't ended after every row field was added, which means that for something with no columns, we were checking that the line hadn't ended... at the end of the line.

This way, we're doing the check before adding each row field, so we'll only throw an error if we expect to be able to add another field and we can't. I think that's the only change necessary for this to work, but I wasn't able to get my dev env set up fully this week so I hadn't tested it locally.

@jigold
Copy link
Copy Markdown
Contributor

jigold commented Apr 1, 2019

@catoverdrive This looks like it's been running for 2 hours now. I would have expected it to be merged already as well. Could this cause an infinite loop -- you didn't test it locally correct?

@catoverdrive
Copy link
Copy Markdown
Contributor Author

Just fixed it

@danking danking merged commit 4a752ab into hail-is:master Apr 2, 2019
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.

3 participants