Repository navigation
Convert DataFrameSnapshotCache from Scala to Java - #7873
Closed
HaoSun1993 wants to merge 2 commits into
Closed
HaoSun1993 wants to merge 2 commits into
HaoSun1993 wants to merge 2 commits into
Conversation
Signed-off-by: Hao Sun <86338940+HaoSun1993@users.noreply.github.com>
HaoSun1993
requested review from
huan233usc,
murali-db,
raveeram-db,
tdas and
timothyw553
as code owners
October 15, 2026 02:07
1 of 5 tasks
Signed-off-by: Hao Sun <hao.sun@databricks.com>
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.
Withdrawn: the DataFrameSnapshotCache conversion is no longer pursued in this series. The description and validation below document the withdrawn proposal.
Which Delta project/connector is this regarding?
Description
Visibility review
Make the class
private[v2]. The public repository caller, subclass, and exposed-type inventory found no direct consumers requiring broader access. There is no companion.The connector lexical boundary is
io.delta.spark.internal.v2. The JVM classes and required Java entry points retain their public access. Scala source access is checked separately against that package scope.Convert
DataFrameSnapshotCachefrom Java to Scala. Use the ScalaDataFramealias forDataset[Row]while preserving the public constructor, getters, andAutoCloseablecontract.Every
close()call continues to invokeunpersist()on the stored DataFrame.No callers, subclasses, or direct tests of this cache currently exist in the repository.
JVM inspection confirms the same fields and signatures, with matching getter and close
instructions. Performance has not been benchmarked.
How was this patch tested?
Visibility revision validation
Spark 4.0/4.1/4.2 compilation and changed-source scalafmtCheck passed on cumulative source
21fa13e45c5431f8786cb3a957dc7c15328e4adc. All 72 existing Spark 4.2 tests passed with zero failures/errors/skips; baseline case names and outcomes match. Each converted source in this PR is identical to its corresponding validated source. No tests, cases, assertions, or skips were changed.Current revision:
0ba63c99f6c9dc04dddfad94a4994636a507d592. The following earlier conversion checks and performance observations remain applicable.Original conversion validation
build/sbt -DsparkVersion=4.0 sparkV2/compilebuild/sbt -DsparkVersion=4.1 sparkV2/compilebuild/sbt -DsparkVersion=4.2 sparkV2/compile 'sparkV2/testOnly *CDCDataFileTest *ColumnReorderReadFunctionTest *IndexedFileTest'sparkV2/Compile/scalafmtCheck, restricted to the converted Scala source.All commands passed. No tests, assertions, expected results, or skips were changed.
Does this PR introduce any user-facing changes?
No.