Skip to content

[query] Fix bad tuple indexing on PCanonicalBaseStructSettable#8799

Merged
danking merged 9 commits intohail-is:masterfrom
johnc1231:johnc-fix-bad-tuple-indexing
May 15, 2020
Merged

[query] Fix bad tuple indexing on PCanonicalBaseStructSettable#8799
danking merged 9 commits intohail-is:masterfrom
johnc1231:johnc-fix-bad-tuple-indexing

Conversation

@johnc1231
Copy link
Contributor

@johnc1231 johnc1231 commented May 14, 2020

This should fix Julia's bug here: https://discuss.hail.is/t/arrayindexoutofboundsexception-error-in-hail-0-2-40/1413/11

I will make a follow up PR tomorrow splitting things up and making a PCanonicalTupleCode. I just wanted to get rid of this blatantly wrong thing.


def loadField(cb: EmitCodeBuilder, fieldIdx: Int): IEmitCode = {
def loadField(cb: EmitCodeBuilder, i: Int): IEmitCode = {
val ptTuple = pt.asInstanceOf[PTuple]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the wrong fix. PCBaseStructSettable doesn't seem broken -- the fieldIdx here should just be base struct index, not tuple index.

The fix should be to use the true index here:

Looks like Chris's PR that moved a bunch of Emit to IEmit broke this on 4/22.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, ok that's a better idea. One sec

@johnc1231
Copy link
Contributor Author

Fixed! Thanks.

@johnc1231 johnc1231 added the WIP label May 15, 2020
@johnc1231
Copy link
Contributor Author

Added WIP because about to push fixes that still have some debugging info floating around

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