leesf commented on a change in pull request #4270:
URL: https://github.com/apache/hudi/pull/4270#discussion_r767162767
##########
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:
would you please clarify why here use copy while the other just use this?
--
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]