[bugfix] check key ordering when isSorted = true#6267
Merged
danking merged 4 commits intohail-is:masterfrom Jun 7, 2019
Merged
[bugfix] check key ordering when isSorted = true#6267danking merged 4 commits intohail-is:masterfrom
danking merged 4 commits intohail-is:masterfrom
Conversation
f5082d6 to
7ad53cb
Compare
tpoterba
previously approved these changes
Jun 5, 2019
Contributor
|
oh, crap - the lowering rule for MatrixEntriesTable has the same problem: |
Contributor
|
I'm fixing that on this PR. |
Contributor
|
@catoverdrive I pushed a fix on here. I'll let Patrick review I think, unless you want to review my piece. Unfortunately, this kills performance. The no-key benchmark is about 5-6x faster (20s) than the keyed benchmark (110s) |
patrick-schultz
previously requested changes
Jun 6, 2019
| .explode(toExplode) | ||
| .mapRows('row.dropFields(toExplode).insertStruct('row (toExplode))) | ||
| .mapGlobals('global.dropFields(colsField, oldColIdx)) | ||
| .keyBy(child.typ.rowKey ++ child.typ.colKey, isSorted = !(child.typ.rowKey.isEmpty && child.typ.colKey.nonEmpty)) |
Member
There was a problem hiding this comment.
I think you've ensured that this is always sorted. However, if the row key is empty (as uncommon as that might be), we don't want to be doing a collect-by-key (i.e., a collect). In that case I think we just have to shuffle.
Contributor
There was a problem hiding this comment.
ok, added that logic and fixed the field-order problem I had separately.
patrick-schultz
approved these changes
Jun 7, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was causing out-of-order keys to exist and be used in #6223. This doesn't fix that issue specifically, but it will now throw the correct error (and prevent incorrect tables/matrix tables from being written out).