xushiyan commented on a change in pull request #4270:
URL: https://github.com/apache/hudi/pull/4270#discussion_r768254729
##########
File path:
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/HoodieSparkUtils.scala
##########
@@ -47,8 +47,14 @@ import scala.collection.JavaConverters.asScalaBufferConverter
object HoodieSparkUtils extends SparkAdapterSupport {
+ def isSpark2: Boolean = SPARK_VERSION.startsWith("2.")
+
def isSpark3: Boolean = SPARK_VERSION.startsWith("3.")
+ def isSpark3_0: Boolean = SPARK_VERSION.startsWith("3.0")
+
+ def isSpark3_2: Boolean = SPARK_VERSION.startsWith("3.2")
Review comment:
what about spark 3.1 given we have a maven profile for it?
##########
File path: .github/workflows/bot.yml
##########
@@ -24,6 +24,10 @@ jobs:
spark: "spark3,spark3.0.x"
- scala: "scala-2.12"
spark: "spark3,spark3.0.x,spark-shade-unbundle-avro"
+ - scala: "scala-2.12"
+ spark: "spark3,spark3.1.x"
Review comment:
@YannByron Having another profile is fine for now. Moving forward can we
consider limit the number of the profiles like this? Here we need a separate
profile for 3.1.x because there is some breaking changes in 3.2?
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Compaction.scala
##########
@@ -22,17 +22,37 @@ import
org.apache.spark.sql.catalyst.plans.logical.CompactionOperation.Compactio
case class CompactionTable(table: LogicalPlan, operation: CompactionOperation,
instantTimestamp: Option[Long])
extends Command {
override def children: Seq[LogicalPlan] = Seq(table)
+
+ def withNewChildrenInternal(newChildren: IndexedSeq[LogicalPlan]):
CompactionTable = {
+ copy(table = newChildren.head)
+ }
}
case class CompactionPath(path: String, operation: CompactionOperation,
instantTimestamp: Option[Long])
- extends Command
+ extends Command {
+ override def children: Seq[LogicalPlan] = Seq.empty
+
+ def withNewChildrenInternal(newChildren: IndexedSeq[LogicalPlan]):
CompactionPath = {
+ this
+ }
+}
case class CompactionShowOnTable(table: LogicalPlan, limit: Int = 20)
extends Command {
override def children: Seq[LogicalPlan] = Seq(table)
+
+ def withNewChildrenInternal(newChildren: IndexedSeq[LogicalPlan]):
CompactionShowOnTable = {
+ copy(table = newChildren.head)
Review comment:
@YannByron thanks for the explanation; looks like worth noting down as
block comment there.
--
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]