Github user maropu commented on the pull request:
https://github.com/apache/spark/pull/7259#issuecomment-124571393
This patch's very useful for users :))
I leave some comments;
I think we can add a function name together in ExpressionDescription
according to Hive `Description` as follows;
```
@ExpressionDescription(
name="abs",
usage = "_FUNC_(expr) - Returns the absolute value of the numeric
value",
extended = """> SELECT _FUNC_('-1')
1""")
case class Abs(child: Expression) extends UnaryArithmetic {
```
This change removes hard-coded function names in
``FunctionRegistry#expressions`` and function names are derived from their
annotations.
Getting name, usage, and implementation together might make developers
easily understood.
However, not sure which is better.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]