Skip to content

[compiler] fix RIterable#14913

Merged
hail-ci-robot merged 1 commit into
mainfrom
ps/push-vnzsokvkonvq
Jun 16, 2025
Merged

[compiler] fix RIterable#14913
hail-ci-robot merged 1 commit into
mainfrom
ps/push-vnzsokvkonvq

Conversation

@patrick-schultz

Copy link
Copy Markdown
Member

Change Description

Fixes an apparently long standing bug. The issue is that RDict was a subclass of the concrete class RIterable, and assumed that all TypeWithRequirements corresponding to a dict are explicitly constructed as the RDict subclass. However, SContainer._typeWithRequiredness always constructs an RIterable, even though it may be a dict type.

To fix, I eliminated the questionable use of inheritance. RIterable is now final, RDict is deleted in favor of being a special case of RIterable, and RNDArray (which was also a subclass of RIterable, even though TNDArray is not a TIterable) no longer inherits from RIterable.

Security Assessment

  • This change cannot impact the Hail Batch instance as deployed by Broad Institute in GCP

@chrisvittal chrisvittal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Thanks for the fix.

@ehigham ehigham left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great - a prime example of why inheritance is evil.

@ehigham ehigham modified the milestone: 0.2.136 Jun 12, 2025
@hail-ci-robot hail-ci-robot merged commit f9e0268 into main Jun 16, 2025
4 checks passed
@hail-ci-robot hail-ci-robot deleted the ps/push-vnzsokvkonvq branch June 16, 2025 19:20
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.

4 participants