Package org.yamcs.yarch.streamsql
Class SelectExpression
- java.lang.Object
-
- org.yamcs.yarch.streamsql.SelectExpression
-
public class SelectExpression extends Object
Corresponds to a queries like "select 2*x, x+sum(y+3) from t[...] where x>5 group by x" chain of data/processing (D=Data, P=Processing, agg=aggregate):(D1) inputDef (x,y) (P1.1) where filter (x>5) (P1.2) aggInputList (D2) aggInputDef (x,y+3) (P2) aggSelectList (D3) aggOutputDef (x,sum(y+3)) (P3) selectList (D4) outputDef (2*x,x+sum(y+3))
P1.2 is performed by the WindowProcessor If there is no aggregate, then P3 follows directly after P1.1
-
-
Constructor Summary
Constructors Constructor Description SelectExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(ExecutionContext c)
Stream
execute(ExecutionContext c)
TupleDefinition
getOutputDefinition()
void
setAscending(boolean ascending)
void
setFirstSource(TupleSourceExpression tsrc)
void
setFollow(boolean follow)
void
setLimit(BigDecimal offset, BigDecimal limit)
void
setSelectList(List<SelectItem> selectList)
void
setWhereClause(Expression whereClause)
void
setWindow(WindowSpecification windowSpec)
-
-
-
Method Detail
-
setSelectList
public void setSelectList(List<SelectItem> selectList)
-
setFirstSource
public void setFirstSource(TupleSourceExpression tsrc)
-
setWhereClause
public void setWhereClause(Expression whereClause)
-
setWindow
public void setWindow(WindowSpecification windowSpec)
-
setAscending
public void setAscending(boolean ascending)
-
setFollow
public void setFollow(boolean follow)
-
setLimit
public void setLimit(BigDecimal offset, BigDecimal limit)
-
bind
public void bind(ExecutionContext c) throws StreamSqlException
- Throws:
StreamSqlException
-
getOutputDefinition
public TupleDefinition getOutputDefinition()
-
execute
public Stream execute(ExecutionContext c) throws StreamSqlException
- Throws:
StreamSqlException
-
-