presto-record-decoder/src/main/java/io/prestosql/decoder/csv/CsvColumnDecoder.java/CsvColumnDecoder/isNull
class CsvColumnDecoder:    public FieldValueProvider decodeField(String[] tokens)
    {
        if (columnIndex >= tokens.length) {
            return nullValueProvider();
        }
        else {
            return new FieldValueProvider()
            {
                @Override
                public boolean isNull()
                {
                    return tokens[columnIndex].isEmpty();
                }

                @SuppressWarnings("SimplifiableConditionalExpression")
                @Override
                public boolean getBoolean()
                {
                    try {
                        return Boolean.parseBoolean(tokens[columnIndex].trim());
                    }
                    catch (NumberFormatException e) {
                        throw new PrestoException(DECODER_CONVERSION_NOT_SUPPORTED, format("could not parse value '%s' as '%s' for column '%s'", tokens[columnIndex].trim(), columnType, columnName));
                    }
                }

                @Override
                public long getLong()
                {
                    try {
                        return Long.parseLong(tokens[columnIndex].trim());
                    }
                    catch (NumberFormatException e) {
                        throw new PrestoException(DECODER_CONVERSION_NOT_SUPPORTED, format("could not parse value '%s' as '%s' for column '%s'", tokens[columnIndex].trim(), columnType, columnName));
                    }
                }

                @Override
                public double getDouble()
                {
                    try {
                        return Double.parseDouble(tokens[columnIndex].trim());
                    }
                    catch (NumberFormatException e) {
                        throw new PrestoException(DECODER_CONVERSION_NOT_SUPPORTED, format("could not parse value '%s' as '%s' for column '%s'", tokens[columnIndex].trim(), columnType, columnName));
                    }
                }

                @Override
                public Slice getSlice()
                {
                    return truncateToLength(utf8Slice(tokens[columnIndex]), columnType);
                }
            };
        }
    }