Only one of either by or both by.x and by.y may be
specified. If none of the by.x,by.y arguments are specified, and
by=NULL the result is the Cartesian cross product of x and
y. The default value of by performs a cross_join or
join along common array dimensions. The by arguments may
be specified by name or 1-based integer dimension index.If only by is specified, the dimension names or attribute name in
by are assumed to be common across x and y. Otherwise
dimension names or attribute names are matched across the names listed in
by.x and by.y, respectively.
If dimension names are specified and by contains all the dimensions
in each array, then the SciDB join operator is used, otherwise SciDB's
cross_join operator is used. In each either case, the output is a cross
product set of the two arrays along the specified dimensions.
If by or each of by.x and by.y list a single attribute
name, the indicated attributes will be lexicographically ordered as categorical
variables and SciDB will redimension each array along new coordinate systems
defined by the attributes, and then those redimensioned arrays will be joined.
This method limits joins along attributes to a single attribute from
each array. The output array will contain additional columns showing the
attribute factor levels used to join the arrays.
Specify merge=TRUE to perform a SciDB merge operation instead
of a SciDB join.
If all=FALSE (the default), then a SQL-like `natural join`
(an inner join) is performed. If all=TRUE then SQL-like `outer join`
is performed, but this case has some limitiations; in particular the
outer join is not available yet for the merge=TRUE case, for
joining on SciDB attributes, or for joining on subsets of dimensions.
The various SciDB join operators generally require that the arrays have
identical partitioning (coordinate system bounds, chunk size, etc.) in the
common dimensions. The merge method attempts to rectify SciDB
arrays along the specified dimensions as required before joining. Those
dimensions must at least have common lower index bounds.
The merge function may rename SciDB attributes and dimensions as required
to avoid name conflicts in SciDB. See the last example for an
illustration.