SQLState.LANG_INVALID_ROW_COUNT_OFFSET,
Long.toString(val) );
}
} else if (offset instanceof ParameterNode) {
offset.
setType(new DataTypeDescriptor(
TypeId.getBuiltInTypeId(Types.BIGINT),
false /* ignored tho; ends up nullable,
so we test for NULL at execute time */));
}
if (fetchFirst instanceof ConstantNode) {
DataValueDescriptor dvd = ((ConstantNode)fetchFirst).getValue();
long val = dvd.getLong();
if (val < 1) {
throw StandardException.newException(
SQLState.LANG_INVALID_ROW_COUNT_FIRST,
Long.toString(val) );
}
} else if (fetchFirst instanceof ParameterNode) {
fetchFirst.
setType(new DataTypeDescriptor(
TypeId.getBuiltInTypeId(Types.BIGINT),
false /* ignored tho; ends up nullable,
so we test for NULL at execute time*/));
}
}