public class RexNormalize extends Object
Currently, only simple normalization is supported, such as:
In the future, this component may extend to support more normalization cases for general promotion. e.g. the strategy to decide which operand is more complex should be more smart.
There is no one normalization strategy that works for all cases, and no consensus about what
the desired strategies should be. So by default, the normalization is disabled. We do force
normalization when computing the digest of RexCalls during planner planning.
| Modifier and Type | Method and Description |
|---|---|
static int |
hashCode(SqlOperator operator,
List<RexNode> operands)
Computes the hashCode of a rex call.
|
static Pair<SqlOperator,List<RexNode>> |
normalize(SqlOperator operator,
List<RexNode> operands)
Normalizes the variables of a rex call.
|
@API(since="1.24",
status=EXPERIMENTAL)
public static Pair<SqlOperator,List<RexNode>> normalize(SqlOperator operator,
List<RexNode> operands)
operator - The operatoroperands - The operandspublic static int hashCode(SqlOperator operator, List<RexNode> operands)
Note that the logic to decide whether operands need reordering
should be strictly same with normalize(org.apache.calcite.sql.SqlOperator, java.util.List<org.apache.calcite.rex.RexNode>).
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.