Performs a join using the union join function.
421109
def merge(left, right, how='inner', key=None, left_key=None, right_key=None,
          left_as='left', right_as='right'):
    
    return join(left, right, how, key, left_key, right_key,
                join_fn=make_union_join(left_as, right_as))
494050
def join_cols(cols):
    """"""
    return ", ".join([i for i in cols]) if isinstance(cols, (list, tuple, set)) else cols
971979
function _union() {
    var onlyUnions = this.onlyUnions();
    var unions = this.grouped.union;
    if (!unions) {
      return '';
    }
    var sql = '';
    for (var i = 0, l = unions.length; i < l; i++) {
      var union = unions[i];
      if (i > 0) {
        sql += ' ';
      }
      if (i > 0 || !onlyUnions) {
        sql += union.clause + ' ';
      }
      var statement = this.formatter.rawOrFn(union.value);
      if (statement) {
        if (union.wrap) {
          sql += '(';
        }
        sql += statement;
        if (union.wrap) {
          sql += ')';
        }
      }
    }
    return sql;
  }
1200886
def join(self):
        
        LOG.debug("OplogThread: exiting due to join call.")
        self.running = False
        threading.Thread.join(self)
337404
def union(self, other):
        

        obj = self._clone()
        obj.union_update(other)
        return obj
687594
def union_update(self, other, ignore_conflicts=False):
        """"""
        if not ignore_conflicts:
            ensure_compatible(self, other)
        self._objects |= other._objects
        self._properties |= other._properties
        self._pairs |= other._pairs
1374704
def union(self):
        
        usegs = reduce(operator.or_, self.values())
        usegs.name = ' | '.join(self.keys())
        return usegs
207001
def _build_join(t):
    
    t.source.name = t.source.parsed_name
    t.source.alias = t.source.parsed_alias[0] if t.source.parsed_alias else ''

    return t
814949
def join(self, other, *args, **kwarg):
        
        event = Event(*args, **kwarg)
        if self.intersects(other):
            if self.starts_within(other):
                event.begin = other.begin
            else:
                event.begin = self.begin

            if self.ends_within(other):
                event.end = other.end
            else:
                event.end = self.end

            return event
        raise ValueError('Cannot join {} with {}: they don\'t intersect.'.format(self, other))
157282
function buildJoinRelation (join) {
    // if there is already a join on this relation then throw error
    assert.ok(!this.joinRelations[join.relation], 'join already exists for '+join.relation)
    // get relation for join
    var relation = this.model.relation(join.relation)
    // add join to joins
    this.joinRelations[join.relation] = join
    this.joinRelationNames.push(join.relation)
    // create alias for relation table to use in query
    join.relationAlias = this.newAlias(relation.model.name)
    // if join is via another model then join on that table
    if (relation.via) {
        // create alias for via table to use in query
        join.viaAlias = this.newAlias(relation.viaModel.name)
        // add join on alias table to query
        this.join.push( this.joinSql(relation.viaModel.name, join.viaAlias, relation.viaModelIdColumn, this.alias, relation.modelIdColumn, join.left ? 'LEFT JOIN' : 'JOIN') )
        // add join from alias to relation table to query
        this.join.push( this.joinSql(relation.model.name, join.relationAlias, relation.relationIdColumn, join.viaAlias, relation.viaRelationIdColumn, join.left ? 'LEFT JOIN' : 'JOIN') )
    }
    // join directly to related table
    else {
        this.join.push( this.joinSql(relation.model.name, join.relationAlias, relation.relationIdColumn, this.alias, relation.modelIdColumn, join.left ? 'LEFT JOIN' : 'JOIN') )
    }
}
62017
private MultiValueMap<String, String> union(MultiValueMap<String, String> map1, MultiValueMap<String, String> map2) {
		MultiValueMap<String, String> union = new LinkedMultiValueMap<String, String>(map1);
		Set<Entry<String, List<String>>> map2Entries = map2.entrySet();
		for (Iterator<Entry<String, List<String>>> entryIt = map2Entries.iterator(); entryIt.hasNext();) {
			Entry<String, List<String>> entry = entryIt.next();
			String key = entry.getKey();
			List<String> values = entry.getValue();
			for (String value : values) {
				union.add(key, value);
			}
		}
		return union;
	}
846046
String join(Dialect d, boolean isTopLevel, DialectSqlItem function, DialectSqlItem[] items) {//NOSONAR
		int pos = 0;
		for (DialectSqlItem item : items) {
			if (item.subItems != null) {
				String value;
				if (pos > 0 && items[pos - 1] != null && items[pos - 1].type == 'F')
					// join as parameters
					value = join(d, false, items[pos - 1], item.subItems);
				else
					value = join(d, false, null, item.subItems); // join as
																	// string
				item.type = 'S';
				item.value = value;
				item.subItems = null;
			}
			pos++;
		} // now there is no subItems

		if (function != null) {
			List<String> l = new ArrayList<String>();
			for (DialectSqlItem item : items) {
				if (item.type != '0')
					l.add((String) item.value);
			}
			return renderFunction(d, function, l.toArray(new String[l.size()]));
		}

		StringBuilder sb = new StringBuilder();
		if (!isTopLevel)
			sb.append("(");
		for (DialectSqlItem item : items)
			if (item.type != '0') {
				sb.append(item.value);
			}
		if (!isTopLevel)
			sb.append(")");
		return sb.toString();
	}
444682
public static <T> String join(Iterator<T> iterator, CharSequence conjunction) {
		return IterUtil.join(iterator, conjunction);
	}
793766
def join(*args):
		
		if len(args) == 0:
			return

		result = WBinArray(int(args[0]), len(args[0]))
		if len(args) == 1:
			return result
		else:
			result = result.extend(*(args[1:]))
		return result
568687
def build_joins(self):
        
        join_parts = []

        # get the sql for each join object
        for join_item in self.joins:
            join_parts.append(join_item.get_sql())

        # if there are any joins, combine them
        if len(join_parts):
            combined_joins = ' '.join(join_parts)
            return '{0} '.format(combined_joins)
        return ''
664395
function capSplitAndJoin(joiner, options) {
  const string = options.fn(this);
  const members = string.split(/(?=[A-Z])/);
  return members.join(joiner);
}
953276
public void join(JSONArray jsonAllRows, List<String> joinFields, ActionType action) {
        if (jsonAllRows.length() == 0) {
            return;
        }
        JSONObject sample = jsonAllRows.getJSONObject(0);
        if (sample.has("event")) {// GroupBy
            extractAndTakeAction(null, jsonAllRows, joinFields, RequestType.GROUPBY, action);
        } else if (sample.has("result")) {// Could be timeseries/topN
            if (sample.optJSONObject("result") != null) {// Timeseries
                extractAndTakeAction(null, jsonAllRows, joinFields, RequestType.TIMESERIES, action);
            } else if (sample.optJSONArray("result") != null) {// TopN
                // There should be only 1 item in here.
                JSONObject jsonItem = jsonAllRows.getJSONObject(0);
                JSONArray result = jsonItem.getJSONArray("result");
                extractAndTakeAction(jsonItem.optString("timestamp"), result, joinFields, RequestType.TOPN, action);
            }
        }
    }