if (!expression.getDataType().isFixedWidth()) {
output.write(QueryConstants.SEPARATOR_BYTE);
}
expression = expressions.get(i);
// TODO: should we track trailing null values and omit the separator bytes?
if (expression.evaluate(result, value)) {
output.write(value.get(), value.getOffset(), value.getLength());
} else if (i < expressions.size()-1 && expression.getDataType().isFixedWidth()) {
// This should never happen, because any non terminating nullable fixed width type (i.e. INT or LONG) is
// converted to a variable length type (i.e. DECIMAL) to allow an empty byte array to represent null.
throw new DoNotRetryIOException("Non terminating null value found for fixed width expression (" + expression + ") in row: " + result);