You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "weihua zhang (Jira)" <ji...@apache.org> on 2025/10/24 08:23:00 UTC
[jira] [Commented] (CALCITE-7242) Implement a rule to eliminate LITERAL_AGG so that other databases can handle it
[ https://issues.apache.org/jira/browse/CALCITE-7242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032701#comment-18032701 ]
weihua zhang commented on CALCITE-7242:
---------------------------------------
[~scarlin] can you help review this [PR|https://github.com/apache/calcite/pull/4598]? My commit is adapted from your implementation.
> Implement a rule to eliminate LITERAL_AGG so that other databases can handle it
> -------------------------------------------------------------------------------
>
> Key: CALCITE-7242
> URL: https://issues.apache.org/jira/browse/CALCITE-7242
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: weihua zhang
> Priority: Major
> Labels: pull-request-available
>
> Calcite can create an Aggregate RelNode with LITERAL_AGG AggregateCall to check for existence in a subquery. In this case, the Aggregate will do a group by, and just spit out a literal value for each row.
> The LITERAL_AGG function does not exist in other databases. In order to create a RelNode structure that other databases supports, this Aggregate is turned into an Aggregate that still does the "group by" on the relevant groups, but places a Project RelNode on top that returns the literal value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)