hudi-agent commented on code in PR #18293:
URL: https://github.com/apache/hudi/pull/18293#discussion_r3667464826


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/hudi/SparkAdapter.scala:
##########
@@ -197,12 +193,29 @@ trait SparkAdapter extends Serializable {
    * Extract condition in [[DeleteFromTable]]
    * SPARK-38626 condition is no longer Option in Spark 3.3
    */
-  def extractDeleteCondition(deleteFromTable: Command): Expression
+  def extractDeleteCondition(deleteFromTable: Command): Expression = {
+    deleteFromTable.asInstanceOf[DeleteFromTable].condition
+  }
 
   /**
    * Converts instance of [[StorageLevel]] to a corresponding string
    */
-  def convertStorageLevelToString(level: StorageLevel): String
+  def convertStorageLevelToString(level: StorageLevel): String = level match {
+    case NONE => "NONE"

Review Comment:
   🤖 nit: `StorageLevel.toString` already returns these exact strings (e.g. 
`"MEMORY_AND_DISK"`, `"DISK_ONLY"`), so this whole match could be replaced with 
just `level.toString`. The manual mapping adds maintenance surface if Spark 
ever adds a new level.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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