You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2025/07/30 14:40:00 UTC

[jira] [Commented] (CALCITE-7115) Organize and expose useful algebraic tools/APIs

    [ https://issues.apache.org/jira/browse/CALCITE-7115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18010953#comment-18010953 ] 

Stamatis Zampetakis commented on CALCITE-7115:
----------------------------------------------

The idea behind this proposal came by [~julianhyde] in CALCITE-7111. 

Since the various tools/APIs span across different packages and they are not completely uniform the first thing that comes to mind in terms of organizing them together in the code is to use:
* marker interfaces 
* annotations

Since at this stage we are talking mostly about grouping and documentation probably annotations make more sense. Below a few potential names:
{code:java}
public @interface RexTool {}
public @interface RelTool {}
public @interface AlgebraTool {}
{code}

With the presence of annotations we can enforce checks, style, generate code/doc, etc., without putting any burden on our consumers.

The difficulty that arises is how we decide which class/interface becomes part of the group and how we enforce this pattern going forward. Unfortunately, I don't have any ideas at the moment.

> Organize and expose useful algebraic tools/APIs
> -----------------------------------------------
>
>                 Key: CALCITE-7115
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7115
>             Project: Calcite
>          Issue Type: Task
>          Components: core
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>
> Calcite offers various useful "tools" /APIs for performing tasks on algebraic expressions (i.e., RelNode, RexNode). Some of the most commonly used are the following:
> RexSimplify, RexExecutor, RelDecorrelator, RelFieldTrimmer, RexInterpreter.
> It would be nice to find a way to organize these tools together (in a similar fashion that we organize rules) and expose them to the end-users by providing some pointers in the documentation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)