You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2025/01/13 14:43:00 UTC

[jira] [Created] (IGNITE-24195) Sql. Add normalization of expressions generated by RexBuilder

Konstantin Orlov created IGNITE-24195:
-----------------------------------------

             Summary: Sql. Add normalization of expressions generated by RexBuilder 
                 Key: IGNITE-24195
                 URL: https://issues.apache.org/jira/browse/IGNITE-24195
             Project: Ignite
          Issue Type: Improvement
          Components: sql
            Reporter: Konstantin Orlov


At the moment, RexBuilder creates RexCall with operands in order provided by a caller site. Although this is the most correct way to create a call, such an approach may result in a sub-efficient use of memoization for expressions having commutative property.

For example, the same join node due to applied rules may be represented by two distinct string (e.g. two distinct digests. which are used as memoization key):

{code}
    HashJoin(condition=[... OR(=($10, _UTF-8'GERMANY'), =($14, _UTF-8'GERMANY')), OR(=($14, _UTF-8'FRANCE'), =($10, _UTF-8'FRANCE')))]
                     vs
    HashJoin(condition=[... OR(=($14, _UTF-8'FRANCE'), =($10, _UTF-8'FRANCE')), OR(=($10, _UTF-8'GERMANY'), =($14, _UTF-8'GERMANY')))]
{code}

It would be nice to provide some sort of normalization for operations having commutative property.



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