code: @Override
    public String toSql(QueryData queryData, String indent)
    {
      Assert.notEmpty(queryData.getAlternatives(), "BUG: no alternatives");
  
      StringBuffer sb = new StringBuffer();
  
      List<String> alternatives = new ArrayList<>();
      for (List<QueryNode> alternative : queryData.getAlternatives())
      {
        alternatives.add(createSqlForAlternative(queryData, alternative, indent));
      }
      sb.append(StringUtils.join(alternatives, "\n" + indent + "UNION "));
  
      // ORDER BY and LIMIT/OFFSET clauses cannot depend on alternative?
      appendOrderByClause(sb, queryData, null, indent);
      appendLimitOffsetClause(sb, queryData, null, indent);
  
      return sb.toString();
    }
docs: corpusList, documents