Skip to content

Core: Fix API breakages around scanMetrics()#6664

Merged
szehon-ho merged 1 commit into
apache:masterfrom
nastra:fix-scan-metrics-revapi-breaks
Jan 26, 2023
Merged

Core: Fix API breakages around scanMetrics()#6664
szehon-ho merged 1 commit into
apache:masterfrom
nastra:fix-scan-metrics-revapi-breaks

Conversation

@nastra
Copy link
Copy Markdown
Contributor

@nastra nastra commented Jan 25, 2023

#6365 moved scanMetrics() from BaseTableScan higher in the hierarchy to SnapshotScan and required RevAPI changes due to making method package-private instead of protected (meaning that classes in different packages wouldn't have access to that method anymore). This PR makes sure that we don't need the RevAPI changes and changes visibility back to protected.

/cc @szehon-ho @rdblue

@github-actions github-actions Bot added the core label Jan 25, 2023
@nastra nastra requested review from rdblue and szehon-ho January 25, 2023 16:58
Comment thread core/src/main/java/org/apache/iceberg/SnapshotScan.java
Copy link
Copy Markdown
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

Hi @nastra , thanks for this fix. Sorry initially I intended just to move the method to the super class.

I got confused that I'm back at Java from Scala, I somehow it slipped my mind and I thought making it from protected => default is a backward compatibile promotion :(. It seems I dont need to change the method access level then, and I'm ok with leaving it as protected. Do we still need the deprecation as its still available on BaseTableScan's subclasses via inheritance (and was not really a public API to begin with?)

Comment thread core/src/main/java/org/apache/iceberg/BaseTableScan.java Outdated
@nastra nastra force-pushed the fix-scan-metrics-revapi-breaks branch from 0965fb3 to e900425 Compare January 26, 2023 07:38
@nastra
Copy link
Copy Markdown
Contributor Author

nastra commented Jan 26, 2023

@szehon-ho thanks for the review. I double-checking and we actually don't need to deprecate anything. Making the method in the super class protected again fixes the issue, so we should be good with that.

@nastra nastra closed this Jan 26, 2023
@nastra nastra reopened this Jan 26, 2023
Copy link
Copy Markdown
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

Looks good to me, if test pass. Thanks!

Comment thread .palantir/revapi.yml
Copy link
Copy Markdown
Member

@ajantha-bhat ajantha-bhat left a comment

Choose a reason for hiding this comment

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

LGTM.
Please update the PR description. It still talks about deprecation.

@szehon-ho szehon-ho merged commit 038091f into apache:master Jan 26, 2023
@szehon-ho
Copy link
Copy Markdown
Member

Merged, thanks @nastra and @ajantha-bhat for review

@nastra nastra deleted the fix-scan-metrics-revapi-breaks branch January 26, 2023 17:57
krvikash pushed a commit to krvikash/iceberg that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants