@Override
public boolean isValid(boolean fail) {
// In the window specifications, an aggregate call such as
// 'SUM(RexInputRef #10)' refers to expression #10 of inputProgram.
// (Not its projections.)
final RelDataType childRowType = getChild().getRowType();
final int childFieldCount = childRowType.getFieldCount();
final int inputSize = childFieldCount + constants.size();
final List<RelDataType> inputTypes =
new AbstractList<RelDataType>() {
@Override
public RelDataType get(int index) {
return index < childFieldCount
? childRowType.getFieldList().get(index).getType()
: constants.get(index - childFieldCount).getType();
}
@Override
public int size() {