Package org.apache.calcite.sql2rel
Class StandardConvertletTable.AvgVarianceConvertlet
- java.lang.Object
-
- org.apache.calcite.sql2rel.StandardConvertletTable.AvgVarianceConvertlet
-
- All Implemented Interfaces:
SqlRexConvertlet
- Enclosing class:
- StandardConvertletTable
private static class StandardConvertletTable.AvgVarianceConvertlet extends java.lang.Object implements SqlRexConvertlet
Convertlet that handlesAVG
andVARIANCE
windowed aggregate functions.
-
-
Constructor Summary
Constructors Constructor Description AvgVarianceConvertlet(SqlKind kind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RexNode
convertCall(SqlRexContext cx, SqlCall call)
private SqlNode
expandAvg(SqlNode arg, RelDataType avgType, SqlRexContext cx)
private SqlNode
expandVariance(SqlNode argInput, RelDataType varType, SqlRexContext cx, boolean biased, boolean sqrt)
private SqlNode
getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
-
-
-
Field Detail
-
kind
private final SqlKind kind
-
-
Constructor Detail
-
AvgVarianceConvertlet
AvgVarianceConvertlet(SqlKind kind)
-
-
Method Detail
-
convertCall
public RexNode convertCall(SqlRexContext cx, SqlCall call)
- Specified by:
convertCall
in interfaceSqlRexConvertlet
-
expandAvg
private SqlNode expandAvg(SqlNode arg, RelDataType avgType, SqlRexContext cx)
-
expandVariance
private SqlNode expandVariance(SqlNode argInput, RelDataType varType, SqlRexContext cx, boolean biased, boolean sqrt)
-
getCastedSqlNode
private SqlNode getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
-
-