MaxGekk commented on code in PR #37804:
URL: https://github.com/apache/spark/pull/37804#discussion_r963438186
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -598,7 +598,7 @@ object FunctionRegistry {
// datetime functions
expression[AddMonths]("add_months"),
expression[CurrentDate]("current_date"),
- expression[CurrentDate]("curdate", setAlias = true, Some("3.4.0")),
+ expressionBuilder("curdate", CurDateExpressionBuilder, setAlias = true),
Review Comment:
see the doc build failure:
```
SELECT curdate();
SELECT curdate;
Traceback (most recent call last):
File "/__w/spark/spark/sql/gen-sql-functions-docs.py", line 240, in
<module>
generate_functions_examples_html(jvm, jspark, html_output_dir)
File "/__w/spark/spark/sql/gen-sql-functions-docs.py", line 225, in
generate_functions_examples_html
examples = _make_pretty_examples(jspark, infos)
File "/__w/spark/spark/sql/gen-sql-functions-docs.py", line 165, in
_make_pretty_examples
query_output = jspark.sql(query).showString(20, 20, False)
File
"/__w/spark/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line
1322, in __call__
File "/__w/spark/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py",
line 326, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling o1.sql.
: org.apache.spark.sql.AnalysisException: [UNRESOLVED_COLUMN] A column or
function parameter with name `curdate` cannot be resolved. Did you mean one of
the following? []; line 1 pos 7;
```
--
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]