Skip to content

Make Delta able to cross-compile against Spark Latest Release (3.5) and Spark Master (4.0)#2877

Merged
scottsand-db merged 1 commit intodelta-io:masterfrom
scottsand-db:delta_cross_spark_compilation
Apr 10, 2024
Merged

Make Delta able to cross-compile against Spark Latest Release (3.5) and Spark Master (4.0)#2877
scottsand-db merged 1 commit intodelta-io:masterfrom
scottsand-db:delta_cross_spark_compilation

Conversation

@scottsand-db
Copy link
Collaborator

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

What DOES this PR do?

  • changes Delta's build.sbt to compile delta-spark against spark master. compilation succeeds. tests pass against spark 3.5. tests run but fail against spark master
    • e.g. build/sbt -DsparkVersion=master spark/test
  • the default spark version for Delta is still Spark 3.5
  • testing requires building unidoc for (unfortunately) ALL projects in build.sbt. that breaks since spark master uses JDK 17 but delta-iceberg uses JDK 8. thus, we disable unidoc for delta-spark compiling against spark-master for now.
  • Delta: creates spark-3.5 and spark-master folders. Delta will be able to cross compile against both. These folders will contain shims (code that will be selectively pulled to compile against a single spark version) but also spark-version-only code

What does this PR NOT do?

  • this PR does not update any build infra (GitHub actions) to actually compile or test delta-spark against Spark Master. That will come later.

How was this patch tested?

Existing tests.

build/sbt -DsparkVersion=3.5 spark/test
build/sbt -DsparkVersion=master spark/compile
build/sbt -DsparkVersion=master spark/test ❌ (expected, these fixes will come later)

Does this PR introduce any user-facing changes?

No

@scottsand-db scottsand-db self-assigned this Apr 10, 2024
@scottsand-db scottsand-db requested review from tdas and vkorukanti April 10, 2024 18:21
@felipepessoto
Copy link
Contributor

@scottsand-db if you have a chance could you look at this #2828 PR? It also makes some changes to match Scala version with Spark main and 3.5 branches, and security updates.

Thanks.

Copy link
Collaborator

@vkorukanti vkorukanti left a comment

Choose a reason for hiding this comment

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

The shim model lgtm. One qn: does this require Spark to publish the jars from master branch daily or periodically?

@scottsand-db
Copy link
Collaborator Author

The shim model lgtm. One qn: does this require Spark to publish the jars from master branch daily or periodically?

@vkorukanti we just depend on 4.0.0-SNAPSHOT, which is a nightly spark build. if they skip a night, then 🤷 that's fine too

@scottsand-db scottsand-db merged commit ad9f67a into delta-io:master Apr 10, 2024
andreaschat-db pushed a commit to andreaschat-db/delta that referenced this pull request Apr 16, 2024
…nd Spark Master (4.0) (delta-io#2877)

#### Which Delta project/connector is this regarding?

- [X] Spark
- [ ] Standalone
- [ ] Flink
- [ ] Kernel
- [ ] Other (fill in here)

## Description

### What DOES this PR do?
- changes Delta's `build.sbt` to compile `delta-spark` against spark
master. compilation succeeds. tests pass against spark 3.5. tests run
but fail against spark master
  - e.g. `build/sbt -DsparkVersion=master spark/test`
- the default spark version for Delta is still Spark 3.5
- testing requires building unidoc for (unfortunately) ALL projects in
build.sbt. that breaks since spark master uses JDK 17 but delta-iceberg
uses JDK 8. thus, we disable unidoc for delta-spark compiling against
spark-master for now.
- Delta: creates `spark-3.5` and `spark-master` folders. Delta will be
able to cross compile against both. These folders will contain `shims`
(code that will be selectively pulled to compile against a single spark
version) but also spark-version-only code

### What does this PR NOT do?
- this PR does not update any build infra (GitHub actions) to actually
compile or test delta-spark against Spark Master. That will come later.

## How was this patch tested?

Existing tests.

`build/sbt -DsparkVersion=3.5 spark/test` ✅ 
`build/sbt -DsparkVersion=master spark/compile` ✅ 
`build/sbt -DsparkVersion=master spark/test` ❌ (expected, these fixes
will come later)

## Does this PR introduce _any_ user-facing changes?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants