huaxingao commented on code in PR #37393:
URL: https://github.com/apache/spark/pull/37393#discussion_r940968890
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/InMemoryTableWithV2Filter.scala:
##########
@@ -30,7 +30,17 @@ class InMemoryTableWithV2Filter(
schema: StructType,
partitioning: Array[Transform],
properties: util.Map[String, String])
- extends InMemoryTable(name, schema, partitioning, properties) {
+ extends InMemoryBaseTable(name, schema, partitioning, properties) with
SupportsDeleteV2 {
+
+ override def canDeleteWhere(filters: Array[Predicate]): Boolean = {
+ InMemoryTableWithV2Filter.supportsFilters(filters)
+ }
+
+ override def deleteWhere(filters: Array[Predicate]): Unit =
dataMap.synchronized {
+ import
org.apache.spark.sql.connector.catalog.CatalogV2Implicits.MultipartIdentifierHelper
+ dataMap --= InMemoryTableWithV2Filter
+ .filtersToKeys(dataMap.keys, partCols.map(_.toSeq.quoted), filters)
Review Comment:
Importing the class vs. explicitly specifying the class doesn't seem to make
much difference to me. I prefer to keep this as is.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]