Package org.apache.calcite.sql
Class SqlJdbcFunctionCall.PermutingMakeCall
- java.lang.Object
-
- org.apache.calcite.sql.SqlJdbcFunctionCall.SimpleMakeCall
-
- org.apache.calcite.sql.SqlJdbcFunctionCall.PermutingMakeCall
-
- All Implemented Interfaces:
SqlJdbcFunctionCall.MakeCall
- Enclosing class:
- SqlJdbcFunctionCall
private static class SqlJdbcFunctionCall.PermutingMakeCall extends SqlJdbcFunctionCall.SimpleMakeCall
Implementation ofSqlJdbcFunctionCall.MakeCall
that can re-order or ignore operands.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int[]
order
-
Fields inherited from class org.apache.calcite.sql.SqlJdbcFunctionCall.SimpleMakeCall
operator
-
-
Constructor Summary
Constructors Constructor Description PermutingMakeCall(SqlOperator operator, int[] order)
Creates a MakeCall strategy object with reordering of operands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlCall
createCall(SqlParserPos pos, SqlNode... operands)
Creates and return aSqlCall
.private java.lang.String
getArgCountMismatchMsg(int... possible)
java.lang.String
isValidArgCount(SqlCallBinding binding)
protected SqlNode[]
reorder(SqlNode[] operands)
Uses the data inorder
to reorder a SqlNode[] array.-
Methods inherited from class org.apache.calcite.sql.SqlJdbcFunctionCall.SimpleMakeCall
getOperator
-
-
-
-
Constructor Detail
-
PermutingMakeCall
PermutingMakeCall(SqlOperator operator, int[] order)
Creates a MakeCall strategy object with reordering of operands.The reordering is specified by an int array where the value of element at position
i
indicates to which element in a new SqlNode[] array the operand goes.- Parameters:
operator
- Operatororder
- Order
-
-
Method Detail
-
createCall
public SqlCall createCall(SqlParserPos pos, SqlNode... operands)
Description copied from interface:SqlJdbcFunctionCall.MakeCall
Creates and return aSqlCall
. If the MakeCall strategy object was created with a reordering specified the call will be created with the operands reordered, otherwise no change of ordering is applied- Specified by:
createCall
in interfaceSqlJdbcFunctionCall.MakeCall
- Overrides:
createCall
in classSqlJdbcFunctionCall.SimpleMakeCall
operands
- Operands
-
isValidArgCount
public java.lang.String isValidArgCount(SqlCallBinding binding)
- Specified by:
isValidArgCount
in interfaceSqlJdbcFunctionCall.MakeCall
- Overrides:
isValidArgCount
in classSqlJdbcFunctionCall.SimpleMakeCall
-
getArgCountMismatchMsg
private java.lang.String getArgCountMismatchMsg(int... possible)
-
-