-
Notifications
You must be signed in to change notification settings - Fork 608
[CORE] Fix Delta 4.0 Spark 4.1 package build #12078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8cb01ca
Fix Delta 4.0 Spark 4.1 package build
755f481
Merge branch 'main' into fix/delta40-nightly-package
malinjawi 1e7ade9
Use Delta 4.1 for Spark 4.1 profile
f6bc30f
Align Delta tests with Spark 4.1 errors
513e63d
Add Spark 4.1 Delta compile coverage
a24230c
Trigger CI
7991ee1
Merge branch 'main' into fix/delta40-nightly-package
malinjawi 0be42c9
Address Spark 4.1 Delta review comments
4b43dc2
Merge remote-tracking branch 'upstream/main' into pr12078-review-fix-…
f2200aa
Move Spark 4.1 MemoryStream shim to Delta tests
b238da0
Move MemoryStream compatibility to Spark 4.1 shim
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
32 changes: 32 additions & 0 deletions
32
shims/spark41/src/main/scala/org/apache/spark/sql/execution/streaming/MemoryStream.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark.sql.execution.streaming | ||
|
|
||
| import org.apache.spark.sql.{Encoder, SQLContext} | ||
| import org.apache.spark.sql.execution.streaming.runtime.{MemoryStream => RuntimeMemoryStream} | ||
|
|
||
| object MemoryStream { | ||
| def apply[A: Encoder](implicit sqlContext: SQLContext): RuntimeMemoryStream[A] = { | ||
| RuntimeMemoryStream[A](implicitly[Encoder[A]], sqlContext.sparkSession) | ||
| } | ||
|
|
||
| def apply[A: Encoder]( | ||
| numPartitions: Int)( | ||
| implicit sqlContext: SQLContext): RuntimeMemoryStream[A] = { | ||
| RuntimeMemoryStream[A](numPartitions)(implicitly[Encoder[A]], sqlContext.sparkSession) | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems this class is introduced in this patch, is this a must?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rechecked this and agreed it should not live in the Spark 4.1 shim jar. I moved the compatibility wrapper into
backends-velox/src-delta40-spark41/test, wired that test source root only under the Spark 4.1 profile, and deleted the production shim source. Verified locally with./build/mvn -ntp -pl backends-velox -am clean test-compile -Pspark-4.1 -Pscala-2.13 -Pjava-17 -Pbackends-velox -Pspark-ut -Pdelta -DskipTests -Dmaven.source.skip.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update after the later discussion: I moved this back into the Spark 4.1 shim layer and removed the
backends-velox/src-delta40-spark41test source root. This follows the same pattern asShuffleUtils: expose the old Spark API package from the Spark 4.1 shim while delegating to vanilla Spark 4.1execution.streaming.runtime.MemoryStream. The class is only an API compatibility bridge for shared sources across Spark versions.