cloud-fan commented on code in PR #37393:
URL: https://github.com/apache/spark/pull/37393#discussion_r942633040
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/connector/PredicateUtils.scala:
##########
@@ -132,4 +133,16 @@ private[sql] object PredicateUtils {
case _ => None
}
}
+
+ def toV1(
+ predicates: Array[Predicate],
+ skipIfNotConvertible: Boolean): Array[Filter] = {
Review Comment:
thinking about this more, I think we can just have
```
def toV1(predicates: Array[Predicate]): Array[Filter] = ...
```
In `SupportsDelete`, we can check the number of returned v1 filter
```
default boolean canDeleteWhere(Predicate[] predicates) {
Filter[] v1Filters = PredicateUtils.toV1(predicates);
if (v1Filters.length < predicates) return false;
return this.canDeleteWhere(v1Filters);
}
default void deleteWhere(Predicate[] predicates) {
this.deleteWhere(PredicateUtils.toV1(predicates));
}
```
--
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]