Skip to content

HIVE-29413: Avoid code duplication by updating getPartCols method for iceberg tables#6413

Open
ramitg254 wants to merge 7 commits intoapache:masterfrom
ramitg254:HIVE-29413
Open

HIVE-29413: Avoid code duplication by updating getPartCols method for iceberg tables#6413
ramitg254 wants to merge 7 commits intoapache:masterfrom
ramitg254:HIVE-29413

Conversation

@ramitg254
Copy link
Copy Markdown
Contributor

@ramitg254 ramitg254 commented Apr 7, 2026

What changes were proposed in this pull request?

added getEffectivePartCols() in most places possible to avoid code duplication.

Why are the changes needed?

getPartCols() does not have support for iceberg tables.

Does this PR introduce any user-facing change?

No

How was this patch tested?

ci tests and local build

@deniskuzZ
Copy link
Copy Markdown
Member

@ramitg254 please take a look: 9e7535c. I would suggest following similar approach

@ramitg254
Copy link
Copy Markdown
Contributor Author

ramitg254 commented Apr 10, 2026

9e7535c

but here we are creating separate method getEffectivePartCols() and leaving getPartCols() as it is, which as per our discussion on that closed pr we shouldn't do that, and only go ahead with updating getPartCols()

@deniskuzZ
Copy link
Copy Markdown
Member

deniskuzZ commented Apr 10, 2026

9e7535c

but here we are creating separate method getEffectivePartCols() and leaving getPartCols() as it is, which as per our discussion on that closed pr we shouldn't do that, and only go ahead with updating getPartCols()

Where did I say that? The ask was to keep the original method unchanged. same here

@ramitg254
Copy link
Copy Markdown
Contributor Author

ramitg254 commented Apr 10, 2026

oh I got confused due to this comment: #6337 (comment) in which getSupportedPartCols() was just separate method similar to getEffectivePartCols()

@ramitg254
Copy link
Copy Markdown
Contributor Author

ramitg254 commented Apr 10, 2026

I am fine with that earlier approach as well but recently I saw this one: https://issues.apache.org/jira/browse/HIVE-29525 so I thought we should have unified getPartCols() and getCols() which gives similar results as native hive tables as first step towards solving this after that those plan logics can be taken care of later on when that ticket will be addressed.
So I was first focussing on making getPartCols() unified for iceberg tables as well.

please share your thoughts on this idea

@sonarqubecloud
Copy link
Copy Markdown

@ramitg254 ramitg254 changed the title [WIP] HIVE-29413: Avoid code duplication by updating getPartCols method for iceberg tables Apr 13, 2026
@ramitg254
Copy link
Copy Markdown
Contributor Author

ramitg254 commented Apr 13, 2026

@deniskuzZ please review this patch
replaced getPartCols() with getEffectivePartCols() wherever possible and kept getPartCols() in places where hack was needed to use getEffectivePartCols()
changes were made keeping this in mind that we should reduce usage of getPartCols() anywhere possible so that both methods can be merged to one later on in future
refractor is also done and will address sonar issues along with the changes if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants