this.isDistinct = true;
this.arrayType = arrayType;
distinctValues = new HashSet();
if (type.isRowType() || type.isArrayType()) {
TypedComparator comparator = Type.newComparator(session);
SortAndSlice sort = new SortAndSlice();
int length = type.isRowType()
? ((RowType) type).getTypesArray().length
: 1;
sort.prepareMultiColumn(length);
comparator.setType(type, sort);
distinctValues.setComparator(comparator);
}
}
if (setType == OpTypes.VAR_SAMP || setType == OpTypes.STDDEV_SAMP) {