yihua commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2074425442


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/exception/HoodieAnalysisException.scala:
##########
@@ -0,0 +1,27 @@
+/*
+ * 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.hudi.command.exception
+
+import org.apache.spark.sql.AnalysisException
+
+class HoodieAnalysisException (override val message: String,

Review Comment:
   If we do want to introduce `HoodieAnalysisException`, introduce the class in 
a new PR which should be independent of Spark 4 support.



##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/analysis/HoodieAnalysis.scala:
##########
@@ -55,7 +56,9 @@ object HoodieAnalysis extends SparkAdapterSupport {
     val adaptIngestionTargetLogicalRelations: RuleBuilder = session => 
AdaptIngestionTargetLogicalRelations(session)
 
     rules += adaptIngestionTargetLogicalRelations
-    val dataSourceV2ToV1FallbackClass = if (HoodieSparkUtils.isSpark3_5)
+    val dataSourceV2ToV1FallbackClass = if (HoodieSparkUtils.isSpark4_0)

Review Comment:
   Would be good to create a JIRA to revisit the classes 
`HoodieSpark33DataSourceV2ToV1Fallback`, 
`HoodieSpark34DataSourceV2ToV1Fallback`, 
`HoodieSpark35DataSourceV2ToV1Fallback`, and 
`HoodieSpark40DataSourceV2ToV1Fallback`.  If there is no difference, we should 
unify them into a single class in Hudi spark common module.



-- 
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]

Reply via email to