Search in sources :

Example 1 with WindowSpecification

use of org.teiid.language.WindowSpecification in project teiid by teiid.

the class LanguageBridgeFactory method translate.

org.teiid.language.WindowFunction translate(WindowFunction windowFunction) {
    org.teiid.language.WindowFunction result = new org.teiid.language.WindowFunction();
    result.setFunction(translate(windowFunction.getFunction()));
    WindowSpecification ws = new WindowSpecification();
    ws.setOrderBy(translate(windowFunction.getWindowSpecification().getOrderBy(), false));
    List<Expression> partition = windowFunction.getWindowSpecification().getPartition();
    if (partition != null) {
        ArrayList<org.teiid.language.Expression> partitionList = translateExpressionList(partition);
        ws.setPartition(partitionList);
    }
    result.setWindowSpecification(ws);
    return result;
}
Also used : WindowFunction(org.teiid.query.sql.symbol.WindowFunction) SearchedCaseExpression(org.teiid.query.sql.symbol.SearchedCaseExpression) Expression(org.teiid.query.sql.symbol.Expression) WindowSpecification(org.teiid.language.WindowSpecification) org.teiid.language(org.teiid.language)

Aggregations

org.teiid.language (org.teiid.language)1 WindowSpecification (org.teiid.language.WindowSpecification)1 Expression (org.teiid.query.sql.symbol.Expression)1 SearchedCaseExpression (org.teiid.query.sql.symbol.SearchedCaseExpression)1 WindowFunction (org.teiid.query.sql.symbol.WindowFunction)1