This feature intends to generalize the creation of common FunctionExpression implementations within dialects. It introduces a GeneralFunctionExpression class for functions that simply need a name and one value, which could be used by any dialects to quickly add functions, particularly aggregates.
As such, this pull request also includes the average() function as an addition to the BaseSQLDialect
Testing
Unit tests were added for the base aggregate functions, however, some adjustment was required to make it work generically for all databases as the types returned by the databases for an aggregate are not all the same. Some returned a Long vs a Double for the average() function for example.
Description
This feature intends to generalize the creation of common
FunctionExpression
implementations within dialects. It introduces aGeneralFunctionExpression
class for functions that simply need a name and one value, which could be used by any dialects to quickly add functions, particularly aggregates.As such, this pull request also includes the average() function as an addition to the
BaseSQLDialect
Testing
Unit tests were added for the base aggregate functions, however, some adjustment was required to make it work generically for all databases as the types returned by the databases for an aggregate are not all the same. Some returned a Long vs a Double for the average() function for example.