repartitionDS#

swordfish.function.repartitionDS()#

Repartition a table with specified partitioning type and scheme, and return a tuple of data sources.

If query is metacode of SQL statements, the parameter column must be specified. For a partitioned table with a COMPO domain, partitionType and partitionScheme can be unspecified. In this case, the data sources will be determined based on the original partitionType and partitionScheme of column.

If query is a tuple of metacode of SQL statements, the following 3 parameters should be unspecified. The function returns a tuple with the same length as query. Each element of the result is a data source corresponding to a piece of metacode in query.

Parameters:
  • query (Constant) – A metacode of SQL statements or a tuple of metacode of SQL statements.

  • column (Constant, optional) – A string indicating a column name in query. Function repartitionDS deliminates data sources based on column.

  • partitionType (Constant, optional) – Means the type of partition. It can take the value of VALUE or RANGE.

  • partitionScheme (Constant, optional) – A vector indicating the partitioning scheme. For details please refer to DistributedComputing.

  • local (Constant, optional) – A Boolean value indicating whether to fetch the data sources to the local node for computing. The default value is true. When set to false, if repartitionDS is called on a compute node within a compute group, data sources are fetched to all compute nodes within the group; Otherwise data sources are fetched to all data nodes and compute nodes which are not included in any compute groups.