Progress:
In progressChanges

Summary

  1. [SPARK-29883][SQL] Implement a helper method for aliasing bool_and() and (details)
Commit dcea7a4c9a04190dffec184eb286e9709faf3272 by wenchen
[SPARK-29883][SQL] Implement a helper method for aliasing bool_and() and
bool_or()
### What changes were proposed in this pull request? This PR introduces
a method `expressionWithAlias` in class `FunctionRegistry` which is used
to register function's constructor. Currently, `expressionWithAlias` is
used to register `BoolAnd` & `BoolOr`.
### Why are the changes needed? Error message is wrong when alias name
is used for `BoolAnd` & `BoolOr`.
### Does this PR introduce any user-facing change? No
### How was this patch tested? Tested manually.
For query,
`select every('true');`
Output before this PR,
> Error in query: cannot resolve 'bool_and('true')' due to data type
mismatch: Input to function 'bool_and' should have been boolean, but
it's [string].; line 1 pos 7;
After this PR,
> Error in query: cannot resolve 'every('true')' due to data type
mismatch: Input to function 'every' should have been boolean, but it's
[string].; line 1 pos 7;
Closes #26712 from amanomer/29883.
Authored-by: Aman Omer <amanomer1996@gmail.com> Signed-off-by: Wenchen
Fan <wenchen@databricks.com>
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/UnevaluableAggs.scala (diff)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/results/group-by.sql.out (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/ExplainSuite.scala (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/results/udf/udf-group-by.sql.out (diff)