rdblue commented on a change in pull request #25115: [SPARK-28351][SQL] Support
DELETE in DataSource V2
URL: https://github.com/apache/spark/pull/25115#discussion_r309798695
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/TestInMemoryTableCatalog.scala
##########
@@ -252,6 +252,32 @@ class InMemoryTable(
withData(messages.map(_.asInstanceOf[BufferedRows]))
}
}
+
+ private def splitAnd(filter: Filter): Seq[Filter] = {
+ filter match {
+ case And(left, right) => splitAnd(left) ++ splitAnd(right)
+ case _ => filter :: Nil
+ }
+ }
+
+ override def deleteWhere(filters: Array[Filter]): Unit =
dataMap.synchronized {
+ val deleteKeys = dataMap.keys.filter { partValues =>
Review comment:
This logic should also be refactored instead of copied.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]