huaxingao commented on code in PR #37393:
URL: https://github.com/apache/spark/pull/37393#discussion_r941881351


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/connector/PredicateUtils.scala:
##########
@@ -132,4 +133,18 @@ private[sql] object PredicateUtils {
       case _ => None
     }
   }
+
+  def toV1(
+      predicates: Array[Predicate],
+      skipIfNotConvertible: Boolean): Array[Filter] = {
+    predicates.flatMap { predicate =>
+      val filter = toV1(predicate)
+      if (filter.isEmpty) {
+        if (!skipIfNotConvertible) {
+          throw 
QueryCompilationErrors.unsupportedPredicateToFilterConversionError(predicate.name())
+        }
+      }
+      filter
+    }.toArray

Review Comment:
   I thought Scala 2.13 needs this `toArray` but it turned out not to be the 
case. I have it removed.



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

Reply via email to