-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4691] Cleaning up duplicated classes in Spark 3.3 module #6550
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
d27b712
09d154e
bc75ebf
f3c9c6c
5d66c01
9259aa5
e229784
5495b03
693186c
2b299b4
9fc48f9
98e1832
c6854f7
9c4c641
19fe331
47aeb02
8c923b3
f798198
27efd99
5c80923
204509c
8f7d56e
5b1d6ab
86d5562
1c7683a
bbba30a
4f8101f
bcab7cd
c089a68
c2e28ce
5acd5b1
282d49d
55d3249
64e9753
7f9e915
80e9ea2
3858976
37309a8
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * 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 | ||
|
|
||
| /** | ||
| * NOTE: Since support for [[TableCatalog]] was only added in Spark 3, this trait | ||
| * is going to be an empty one simply serving as a placeholder (for compatibility w/ Spark 2) | ||
| */ | ||
| trait HoodieCatalogUtils {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,10 +79,6 @@ object HoodieAnalysis { | |
| val spark3Analysis: RuleBuilder = | ||
| session => ReflectionUtils.loadClass(spark3AnalysisClass, session).asInstanceOf[Rule[LogicalPlan]] | ||
|
|
||
| val spark3ResolveReferencesClass = "org.apache.spark.sql.hudi.analysis.HoodieSpark3ResolveReferences" | ||
|
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. may be not related to changes in this patch. but "HoodieSpark3Analysis" actually refers to 3.2 or greater right? but the naming is not right. I don't see it being used for 3.1 below.
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. may be you can name the variable in L78, 79 accordingly.
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. This class is actually deleted |
||
| val spark3ResolveReferences: RuleBuilder = | ||
| session => ReflectionUtils.loadClass(spark3ResolveReferencesClass, session).asInstanceOf[Rule[LogicalPlan]] | ||
|
|
||
| val resolveAlterTableCommandsClass = | ||
| if (HoodieSparkUtils.gteqSpark3_3) | ||
| "org.apache.spark.sql.hudi.Spark33ResolveHudiAlterTableCommand" | ||
|
|
@@ -94,10 +90,10 @@ object HoodieAnalysis { | |
| // | ||
| // 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, resolveAlterTableCommands) | ||
| rules ++= Seq(dataSourceV2ToV1Fallback, spark3Analysis, resolveAlterTableCommands) | ||
|
|
||
| } else if (HoodieSparkUtils.gteqSpark3_1) { | ||
| val spark31ResolveAlterTableCommandsClass = "org.apache.spark.sql.hudi.Spark312ResolveHudiAlterTableCommand" | ||
| val spark31ResolveAlterTableCommandsClass = "org.apache.spark.sql.hudi.Spark31ResolveHudiAlterTableCommand" | ||
|
Member
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. Is this a problem if not all writers and readers use the same Hudi version? Maybe not in this case, but just calling it out to think through the change of class names. I had encountered one issue while doing HBase upgrade (however that was because we actually wrote the kv comparator class name in data files).
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. Yeah, in this case class renames don't have any impact |
||
| val spark31ResolveAlterTableCommands: RuleBuilder = | ||
| session => ReflectionUtils.loadClass(spark31ResolveAlterTableCommandsClass, session).asInstanceOf[Rule[LogicalPlan]] | ||
|
|
||
|
|
||
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.
Shall we update the docs/readme as well?