commit | de4631f62cc06b22199c1c14b687ea8a06ea06ec | [log] [tgz] |
---|---|---|
author | Julian Hyde <jhyde@apache.org> | Tue Nov 02 12:13:14 2021 -0700 |
committer | Julian Hyde <jhyde@apache.org> | Sat May 27 21:17:32 2023 -0700 |
tree | 3638432131938203b72b2684bae84a231179c779 | |
parent | ddb4200f8f52b02afb1b866abb0785218e2c5994 [diff] |
[CALCITE-4334] LITERAL_AGG, an internal aggregate function that returns a constant value LITERAL_AGG is internal, so you cannot use it from SQL. A call to LITERAL_AGG(true) is created implicitly when you write SELECT deptno, SUM(sal), true FROM Emp GROUP BY deptno Add RelBuilder.literalAgg. RelBuilder.aggregate now adds an aggregate function to ensure that there is at least one field. The aggregate function is LITERAL_AGG; thus the pseudo-query SELECT /* no fields */ FROM t GROUP BY () becomes the valid query SELECT TRUE AS dummy FROM t GROUP BY (). Solves that problem that an Aggregate query that uses no columns throws AssertionError in RelFieldTrimmer.trimFields. Add an option RelBuilder.Config.preventEmptyFieldList to turn off the behavior we just added. Close apache/calcite#3209
Apache Calcite is a dynamic data management framework.
It contains many of the pieces that comprise a typical database management system but omits the storage primitives. It provides an industry standard SQL parser and validator, a customisable optimizer with pluggable rules and cost functions, logical and physical algebraic operators, various transformation algorithms from SQL to algebra (and the opposite), and many adapters for executing SQL queries over Cassandra, Druid, Elasticsearch, MongoDB, Kafka, and others, with minimal configuration.
For more details, see the home page.
The project uses JIRA for issue tracking. For further information, please see the JIRA accounts guide.