-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat(spark): Drop Apache Spark 3.3 integration support #18786
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,11 +63,8 @@ object HoodieAnalysis extends SparkAdapterSupport { | |
| "org.apache.spark.sql.hudi.analysis.HoodieSpark40DataSourceV2ToV1Fallback" | ||
| } else if (HoodieSparkUtils.isSpark3_5) { | ||
| "org.apache.spark.sql.hudi.analysis.HoodieSpark35DataSourceV2ToV1Fallback" | ||
| } else if (HoodieSparkUtils.isSpark3_4) { | ||
| "org.apache.spark.sql.hudi.analysis.HoodieSpark34DataSourceV2ToV1Fallback" | ||
| } else { | ||
| // Spark 3.3.x | ||
| "org.apache.spark.sql.hudi.analysis.HoodieSpark33DataSourceV2ToV1Fallback" | ||
| "org.apache.spark.sql.hudi.analysis.HoodieSpark34DataSourceV2ToV1Fallback" | ||
| } | ||
| val dataSourceV2ToV1Fallback: RuleBuilder = | ||
| session => instantiateKlass(dataSourceV2ToV1FallbackClass, session) | ||
|
|
@@ -101,12 +98,8 @@ object HoodieAnalysis extends SparkAdapterSupport { | |
| "org.apache.spark.sql.hudi.Spark40ResolveHudiAlterTableCommand" | ||
| } else if (HoodieSparkUtils.gteqSpark3_5) { | ||
| "org.apache.spark.sql.hudi.Spark35ResolveHudiAlterTableCommand" | ||
| } else if (HoodieSparkUtils.isSpark3_4) { | ||
| "org.apache.spark.sql.hudi.Spark34ResolveHudiAlterTableCommand" | ||
| } else if (HoodieSparkUtils.isSpark3_3) { | ||
| "org.apache.spark.sql.hudi.Spark33ResolveHudiAlterTableCommand" | ||
| } else { | ||
| throw new IllegalStateException("Unsupported Spark version") | ||
| "org.apache.spark.sql.hudi.Spark34ResolveHudiAlterTableCommand" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are silently falling back to spark 34 here. I think we should still throw the exception
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I cleaned this up to use only if-else branches to be consistent across the board, since we now compile against Spark 3.5 and 3.4. Having |
||
| } | ||
|
|
||
| val resolveAlterTableCommands: RuleBuilder = | ||
|
|
@@ -150,11 +143,8 @@ object HoodieAnalysis extends SparkAdapterSupport { | |
| "org.apache.spark.sql.execution.datasources.Spark40NestedSchemaPruning" | ||
| } else if (HoodieSparkUtils.gteqSpark3_5) { | ||
| "org.apache.spark.sql.execution.datasources.Spark35NestedSchemaPruning" | ||
| } else if (HoodieSparkUtils.gteqSpark3_4) { | ||
| "org.apache.spark.sql.execution.datasources.Spark34NestedSchemaPruning" | ||
| } else { | ||
| // spark 3.3 | ||
| "org.apache.spark.sql.execution.datasources.Spark33NestedSchemaPruning" | ||
|
yihua marked this conversation as resolved.
|
||
| "org.apache.spark.sql.execution.datasources.Spark34NestedSchemaPruning" | ||
| } | ||
|
|
||
| val nestedSchemaPruningRule = ReflectionUtils.loadClass(nestedSchemaPruningClass).asInstanceOf[Rule[LogicalPlan]] | ||
|
|
@@ -171,12 +161,9 @@ object HoodieAnalysis extends SparkAdapterSupport { | |
| // - Precedes actual [[customEarlyScanPushDownRules]] invocation | ||
| val pruneFileSourcePartitionsClass = if (HoodieSparkUtils.gteqSpark4_0) { | ||
| "org.apache.spark.sql.hudi.analysis.Spark4HoodiePruneFileSourcePartitions" | ||
| } else if (HoodieSparkUtils.gteqSpark3_4) { | ||
| } else { | ||
| // Spark 3.4 and 3.5: PhysicalOperation and ScanOperation unified (SPARK-39764) | ||
| "org.apache.spark.sql.hudi.analysis.Spark3HoodiePruneFileSourcePartitions" | ||
| } else { | ||
| // Spark 3.3: Use ScanOperation for better compatibility | ||
| "org.apache.spark.sql.hudi.analysis.Spark33HoodiePruneFileSourcePartitions" | ||
| } | ||
| rules += (spark => instantiateKlass(pruneFileSourcePartitionsClass, spark)) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.