docs: protected boolean checkUnionCompatible( Columns results1,
                                              Columns results2,
                                              ScanQueryContext context,
                                              QueryCommand query ) {
          if (results1 == results2) return true;
          if (results1 == null || results2 == null) return false;
          if (results1.hasFullTextSearchScores() != results2.hasFullTextSearchScores()) {
              // The query is not compatible
              context.getProblems().addError(JcrI18n.setQueryContainsResultSetsWithDifferentFullTextSearch);
              return false;
          }
          if (results1.getColumns().size() != results2.getColumns().size()) {
              // The query is not compatible
              context.getProblems().addError(JcrI18n.setQueryContainsResultSetsWithDifferentNumberOfColumns,
                                             results1.getColumns().size(), results2.getColumns().size());
              return false;
          }
          // Go through the columns and make sure that the property names and types match ...
          // (we can't just check column names, since the column names may include the selector if more than one selector)
          int numColumns = results1.getColumns().size();
          boolean noProblems = true;
          for (int i = 0; i != numColumns; ++i) {
              Column thisColumn = results1.getColumns().get(i);
              Column thatColumn = results2.getColumns().get(i);
              if (!thisColumn.getPropertyName().equalsIgnoreCase(thatColumn.getPropertyName())) return false;
              String thisType = results1.getColumnTypeForProperty(thisColumn.getSelectorName(), thisColumn.getPropertyName());
              String thatType = results2.getColumnTypeForProperty(thatColumn.getSelectorName(), thatColumn.getPropertyName());
              if (!thisType.equalsIgnoreCase(thatType)) {
                  // The query is not compatible
                  context.getProblems().addError(JcrI18n.setQueryContainsResultSetsWithDifferentColumns, thisColumn, thatColumn);
                  noProblems = false;
              }
          }
          return noProblems;
      }