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 voidbind(ExecutionContext c)Streamexecute(ExecutionContext c)TupleDefinitiongetOutputDefinition()voidsetAscending(boolean ascending)voidsetFirstSource(TupleSourceExpression tsrc)voidsetFollow(boolean follow)voidsetLimit(BigDecimal offset, BigDecimal limit)voidsetSelectList(List<SelectItem> selectList)voidsetWhereClause(Expression whereClause)voidsetWindow(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
-
-