CTTY commented on code in PR #5943:
URL: https://github.com/apache/hudi/pull/5943#discussion_r919516736
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/analysis/HoodieAnalysis.scala:
##########
@@ -64,15 +64,18 @@ object HoodieAnalysis {
val spark3ResolveReferences: RuleBuilder =
session => ReflectionUtils.loadClass(spark3ResolveReferencesClass,
session).asInstanceOf[Rule[LogicalPlan]]
- val spark32ResolveAlterTableCommandsClass =
"org.apache.spark.sql.hudi.ResolveHudiAlterTableCommandSpark32"
- val spark32ResolveAlterTableCommands: RuleBuilder =
- session =>
ReflectionUtils.loadClass(spark32ResolveAlterTableCommandsClass,
session).asInstanceOf[Rule[LogicalPlan]]
+ val resolveAlterTableCommandsClass =
+ if (HoodieSparkUtils.gteqSpark3_3_0)
+ "org.apache.spark.sql.hudi.ResolveHudiAlterTableCommandSpark33"
+ else "org.apache.spark.sql.hudi.ResolveHudiAlterTableCommandSpark32"
+ val resolveAlterTableCommands: RuleBuilder =
+ session => ReflectionUtils.loadClass(resolveAlterTableCommandsClass,
session).asInstanceOf[Rule[LogicalPlan]]
// NOTE: PLEASE READ CAREFULLY
//
// It's critical for this rules to follow in this order, so that
DataSource V2 to V1 fallback
// is performed prior to other rules being evaluated
- rules ++= Seq(dataSourceV2ToV1Fallback, spark3Analysis,
spark3ResolveReferences, spark32ResolveAlterTableCommands)
+ rules ++= Seq(dataSourceV2ToV1Fallback, spark3Analysis,
spark3ResolveReferences, resolveAlterTableCommands)
Review Comment:
[SPARK-38939](https://github.com/apache/spark/pull/36252) DropColumns syntax
change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]