presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/systemtables/PreparedStatementBuilder.java/PreparedStatementBuilder/getWhereClause
class PreparedStatementBuilder:    @SuppressWarnings("OptionalGetWithoutIsPresent")
    private static String getWhereClause(
            TupleDomain<Integer> tupleDomain,
            List<String> columnNames,
            List<Type> types,
            Set<Integer> uuidColumnIndexes,
            List<ValueBuffer> bindValues)
    {
        if (tupleDomain.isNone()) {
            return "";
        }

        ImmutableList.Builder<String> conjunctsBuilder = ImmutableList.builder();
        Map<Integer, Domain> domainMap = tupleDomain.getDomains().get();
        for (Map.Entry<Integer, Domain> entry : domainMap.entrySet()) {
            int index = entry.getKey();
            String columnName = columnNames.get(index);
            Type type = types.get(index);
            conjunctsBuilder.add(toPredicate(index, columnName, type, entry.getValue(), uuidColumnIndexes, bindValues));
        }
        List<String> conjuncts = conjunctsBuilder.build();

        if (conjuncts.isEmpty()) {
            return "";
        }
        StringBuilder where = new StringBuilder("WHERE ");
        return Joiner.on(" AND\n").appendTo(where, conjuncts).toString();
    }