danny0405 commented on code in PR #12961:
URL: https://github.com/apache/hudi/pull/12961#discussion_r1993052432


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/DeleteHoodieTableCommand.scala:
##########
@@ -74,4 +88,13 @@ case class DeleteHoodieTableCommand(dft: DeleteFromTable) 
extends HoodieLeafRunn
 
     Seq.empty[Row]
   }
+
+  def tryPruningDeleteRecordSchema(query: LogicalPlan, requiredColNames: 
Seq[String]): LogicalPlan = {
+    val filteredOutput = query.output.filter(attr => isMetaField(attr.name) || 
requiredColNames.contains(attr.name))
+    if (filteredOutput == query.output) {
+      query
+    } else {
+      Project(filteredOutput, query)
+    }

Review Comment:
   Does the delete records handler follow this contract then? Do they use the 
right schema?



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