java.lang.Object
com.pervasive.datarush.operators.AbstractLogicalOperator
com.pervasive.datarush.operators.CompositeOperator
com.pervasive.datarush.matching.block.BlockCartesian
- All Implemented Interfaces:
LogicalOperator
Block the input data by creating a cartesian product of the data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default buffer size, in records, for blocking. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCompose the body of this operator.intGets the size (in rows) of the memory buffer used to generate output pairs.Gets the output naming pattern for fields from the left hand input.Gets the record port providing the left hand input to the pair generation.Gets the record port providing the results of the pair generation.Gets the output naming pattern for fields from the right hand input.Gets the record port providing the right hand input to the pair generation.voidsetBufferRows(int rows) Sets the size (in rows) of the memory buffer used to generate output pairs.voidsetLeftFieldsPattern(String pattern) Sets the output naming pattern for fields from the left hand input.voidsetRightFieldsPattern(String pattern) Sets the output naming pattern for fields from the right hand input.Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
Field Details
-
DEFAULT_BUFFER_ROWS
public static final int DEFAULT_BUFFER_ROWSThe default buffer size, in records, for blocking.- See Also:
-
-
Constructor Details
-
BlockCartesian
public BlockCartesian()Generates the Cartesian product of the inputs.
-
-
Method Details
-
getLeftFieldsPattern
Gets the output naming pattern for fields from the left hand input.- Returns:
- the pattern for the left hand side field names in output.
-
setLeftFieldsPattern
Sets the output naming pattern for fields from the left hand input. This is used to ensure distinct names in the output pairs.- Parameters:
pattern- name pattern for the left hand side field names
-
getRightFieldsPattern
Gets the output naming pattern for fields from the right hand input.- Returns:
- the pattern for the right hand side field names in output.
-
setRightFieldsPattern
Sets the output naming pattern for fields from the right hand input. This is used to ensure distinct names in the output pairs.- Parameters:
pattern- name pattern for the right hand side field names
-
getBufferRows
public int getBufferRows()Gets the size (in rows) of the memory buffer used to generate output pairs.- Returns:
- the number of rows allowed in the memory buffer
-
setBufferRows
public void setBufferRows(int rows) Sets the size (in rows) of the memory buffer used to generate output pairs. Larger values can increase performance due to decreased intermediate file buffering.- Parameters:
rows- number of rows to store in memory buffer
-
getLeftInput
Gets the record port providing the left hand input to the pair generation.- Returns:
- the left input port for the operation
-
getRightInput
Gets the record port providing the right hand input to the pair generation.- Returns:
- the right input port for the operation
-
getOutput
Gets the record port providing the results of the pair generation.- Returns:
- the output port for the operation
-
compose
Description copied from class:CompositeOperatorCompose the body of this operator. Implementations should do the following:- Perform any validation of configuration, input types, etc
- Instantiate and configure sub-operators, adding them to the provided context via
the method
OperatorComposable.add(O) - Create necessary connections via the method
OperatorComposable.connect(P, P). This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
- Specified by:
composein classCompositeOperator- Parameters:
ctx- the context
-