Package stream.nebula.operators
Class JoinOperator
- java.lang.Object
-
- stream.nebula.operators.Operator
-
- stream.nebula.operators.JoinOperator
-
public class JoinOperator extends Operator
Operator
class that encodes theQuery.joinWith(stream.nebula.runtime.Query)
method.This class follows the builder pattern. Methods such as
Query.joinWith(stream.nebula.runtime.Query)
,JoinOperator.JoinWhere.where(stream.nebula.expression.FieldAccessExpression)
, andJoinOperator.JoinEqualsTo.equalsTo(stream.nebula.expression.FieldAccessExpression)
return the helper classesJoinOperator.JoinWhere
,JoinOperator.JoinEqualsTo
andJoinOperator.JoinWindow
which manipulate the state of thisJoinOperator
instance; finallyJoinOperator.JoinWindow.window(stream.nebula.operators.window.TimeBasedWindowDefinition)
returns the originalQuery
instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
JoinOperator.JoinEqualsTo
Helper inner class to set the right-hand-side joined attributed in theJoinOperator.JoinEqualsTo.equalsTo(stream.nebula.expression.FieldAccessExpression)
method.class
JoinOperator.JoinWhere
Helper inner class to set the left-hand-side joined attributed in theJoinOperator.JoinWhere.where(stream.nebula.expression.FieldAccessExpression)
method.class
JoinOperator.JoinWindow
Helper inner class to define the join window in theJoinOperator.JoinWindow.window(stream.nebula.operators.window.TimeBasedWindowDefinition)
method.
-
Field Summary
-
Fields inherited from class stream.nebula.operators.Operator
childOperator
-
-
Constructor Summary
Constructors Constructor Description JoinOperator(@NonNull Operator childOperator, @NonNull Query joinedQuery, @NonNull Query query)
Create a newJoinOperator
which joinsquery
on the left-hand-side withotherQuery
on the right-hand-side.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Operator
getJoinedOperator()
Access the joined query.FieldAccessExpression
getLhs()
Access the left-hand-side attribute of thisJoinOperator
.FieldAccessExpression
getRhs()
Access the right-hand-side attribute of thisJoinOperator
.TimeBasedWindowDefinition
getWindowDefinition()
Access the join window definition of thisJoinOperator
.-
Methods inherited from class stream.nebula.operators.Operator
getChildOperator
-
-
-
-
Constructor Detail
-
JoinOperator
public JoinOperator(@NonNull Operator childOperator, @NonNull Query joinedQuery, @NonNull Query query) throws java.lang.IllegalArgumentException
Create a newJoinOperator
which joinsquery
on the left-hand-side withotherQuery
on the right-hand-side.- Parameters:
childOperator
- The previous operator in the operator chain ofquery
.joinedQuery
- The joined query.query
- TheQuery
instance on whichQuery.joinWith(stream.nebula.runtime.Query)
was called.- Throws:
java.lang.IllegalArgumentException
- IfjoinedQuery
is null.
-
-
Method Detail
-
getJoinedOperator
public Operator getJoinedOperator()
Access the joined query.- Returns:
- The joined query.
-
getLhs
public FieldAccessExpression getLhs()
Access the left-hand-side attribute of thisJoinOperator
.- Returns:
- The left-hand-side join attribute.
-
getRhs
public FieldAccessExpression getRhs()
Access the right-hand-side attribute of thisJoinOperator
.- Returns:
- The right-hand-side join attribute.
-
getWindowDefinition
public TimeBasedWindowDefinition getWindowDefinition()
Access the join window definition of thisJoinOperator
.- Returns:
- The join window.
-
-