-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Core: Move internal struct projection to SupportsIndexProjection #11132
Conversation
0307b93
to
98cc1c6
Compare
98cc1c6
to
46a0cf5
Compare
} | ||
|
||
/** Base constructor for building the type mapping */ | ||
protected SupportsIndexProjection(Types.StructType baseType, Types.StructType projectionType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer direct imports for nested classes (if the context is clear) to shorten lines. Given that this is a new class, I'd consider importing StructType
and NestedField
directly. That said, our codebase isn't very consistent. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing!
boolean found = false; | ||
for (int j = 0; j < allFields.size(); j += 1) { | ||
if (fields.get(i).fieldId() == allFields.get(j).fieldId()) { | ||
found = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: why not break the j
loop here?
This makes projection more generic and reusable for internal types.