voonhous commented on code in PR #19850:
URL: https://github.com/apache/hudi/pull/19850#discussion_r3944266479


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/HoodieProcedureFilterUtils.scala:
##########
@@ -468,9 +474,22 @@ object HoodieProcedureFilterUtils {
         val columnNames = schema.fieldNames.toSet
         val referencedColumns = extractColumnReferences(parsedExpr)
         val invalidColumns = referencedColumns -- columnNames
+        val resolvedExpr = bindAndResolveExpression(parsedExpr, schema)
+        val unsupportedFunctions = extractFunctionReferences(resolvedExpr)
+        val unsupportedExpressions = resolvedExpr.collect {
+          case expression: Unevaluable
+            if !expression.isInstanceOf[UnresolvedAttribute]
+              && !expression.isInstanceOf[UnresolvedFunction] => 
expression.prettyName
+        }.toSet
 
         if (invalidColumns.nonEmpty) {
           Left(s"Invalid column references: ${invalidColumns.mkString(", ")}. 
Available columns: ${columnNames.mkString(", ")}")
+        } else if (unsupportedFunctions.nonEmpty) {
+          Left(s"Unsupported functions: 
${unsupportedFunctions.toSeq.sorted.mkString(", ")}")
+        } else if (!resolvedExpr.resolved || unsupportedExpressions.nonEmpty) {

Review Comment:
   Thanks, 816e505 addresses this blocker: numeric coercion now runs in the 
shared bind/resolve pipeline before validation checks `resolved`, and the added 
assertion covers a Long column with comparison and BETWEEN predicates. Verified 
by code inspection; I have not rerun the tests locally. Resolving this thread.



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