Core: Move internal struct projection to SupportsIndexProjection#11132
Merged
rdblue merged 1 commit intoapache:mainfrom Sep 18, 2024
Merged
Core: Move internal struct projection to SupportsIndexProjection#11132rdblue merged 1 commit intoapache:mainfrom
rdblue merged 1 commit intoapache:mainfrom
Conversation
0307b93 to
98cc1c6
Compare
98cc1c6 to
46a0cf5
Compare
aokolnychyi
reviewed
Sep 18, 2024
| } | ||
|
|
||
| /** Base constructor for building the type mapping */ | ||
| protected SupportsIndexProjection(Types.StructType baseType, Types.StructType projectionType) { |
Contributor
There was a problem hiding this comment.
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.
rdblue
added a commit
to rdblue/iceberg
that referenced
this pull request
Sep 18, 2024
zachdisc
pushed a commit
to zachdisc/iceberg
that referenced
this pull request
Dec 23, 2024
pvary
reviewed
Jan 9, 2025
| boolean found = false; | ||
| for (int j = 0; j < allFields.size(); j += 1) { | ||
| if (fields.get(i).fieldId() == allFields.get(j).fieldId()) { | ||
| found = true; |
Contributor
There was a problem hiding this comment.
question: why not break the j loop here?
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 makes projection more generic and reusable for internal types.