cloud-fan commented on code in PR #57468:
URL: https://github.com/apache/spark/pull/57468#discussion_r3688658937
##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetFunctionsOperation.scala:
##########
@@ -60,7 +60,7 @@ private[hive] class SparkGetFunctionsOperation(
// get databases for schema pattern
val schemaPattern = convertSchemaPattern(schemaName)
val matchingDbs = catalog.listDatabases(schemaPattern)
- val functionPattern = CLIServiceUtils.patternToRegex(functionName)
+ val functionPattern = functionName
Review Comment:
Keep translating the JDBC function-name pattern before this call.
`DatabaseMetaData.getFunctions` uses `%` and `_`, but
`SessionCatalog.listFunctions` delegates to the `*`-based
`StringUtils.filterPattern`; with the raw value, `getFunctions(..., "%")` now
looks for a literal percent sign and returns no functions. Please bridge those
pattern formats without restoring regex-metacharacter leakage, and add `%`/`_`
coverage.
##########
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIServiceUtils.java:
##########
@@ -36,10 +36,14 @@ public class CLIServiceUtils {
/**
* Convert a SQL search pattern into an equivalent Java Regex.
*
+ * Per JDBC spec, only '%' (match any substring) and '_' (match any single
character) are
+ * wildcard characters. All other characters — including regex
metacharacters like '*', '.',
Review Comment:
Please replace both em dashes in this Javadoc with ASCII punctuation.
Spark's source guidance prohibits non-ASCII typography in comments because it
can trip style checks.
--
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]