ganeshashree commented on code in PR #58450:
URL: https://github.com/apache/spark/pull/58450#discussion_r3985978178
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -1025,9 +1025,31 @@ object FunctionRegistry {
expression[SchemaOfJson]("schema_of_json"),
expression[LengthOfJsonArray]("json_array_length"),
expression[JsonObjectKeys]("json_object_keys"),
- expression[JsonTypeof]("json_typeof")
+ expression[JsonTypeof]("json_typeof"),
+ // Built-in forms of the SQL:2016 JSON constructor and path functions,
resolved for plain calls
+ // that carry no SQL/JSON clauses (the dedicated grammar handles
clause-bearing syntax). The
+ // names must stay in sync with `routedJsonConstructorNames` below.
+ expressionBuilder("json_value", JsonValueExpressionBuilder),
+ expressionBuilder("json_query", JsonQueryExpressionBuilder),
+ expressionBuilder("json_exists", JsonExistsExpressionBuilder),
+ expressionBuilder("json_array", JsonArrayExpressionBuilder)
)
+ /**
+ * Names of the clause-free SQL/JSON constructor/path functions that
`AstBuilder` routes through
+ * function resolution. This is the shared list backing the star guard in
+ * [[FunctionResolution.resolvesToStarDisallowedJsonConstructor]], which
derives its set from here
+ * so a newly routed constructor/path function is covered automatically. It
is NOT a single source
+ * of truth for the whole feature: two sibling lists still need a matching
manual entry when a
Review Comment:
Done.
--
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]