-
Notifications
You must be signed in to change notification settings - Fork 244
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
Refactor SparkSession to fix Spark-4.0 build #12227
base: branch-25.04
Are you sure you want to change the base?
Conversation
Signed-off-by: Niranjan Artal <[email protected]>
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.
nit: So far this file looks more like SparkSessionShims
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.
I agree, for now it looks like SparkSessionShims but I kept a generic name so that we can add any new methods/type aliases if required.
|
||
object TrampolineConnectShims { | ||
|
||
type SparkSession = org.apache.spark.sql.classic.SparkSession |
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.
This means that we should drop preview2 as an accepted Spark 4 version in spark400.SparkShimServiceProvider
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.
Done. PTAL.
…ark_4_session_build_fix
build |
This contributes to build issue #12062 and is a follow up of #12198.
Spark made package name update in Spark-4.0 for SparkSession to support connect.
In this PR, we added support to pick the correct SparkSession for different Spark versions.
For Spark version < 4.0 - It is org.apache.spark.sql.SparkSesssion
For Spark version 4.0 - It is org.apache.spark.sql.classic.SparkSession
In addition to the package name change, sqlContext is removed from Dataframe. Have updated the
InternalColumnarRddConverter.scala
file accordingly.Before this change:
After this change: