Search in sources :

Example 1 with ExprMacro

use of org.apache.druid.math.expr.ExprMacroTable.ExprMacro in project druid by druid-io.

the class SleepSqlTest method createMacroTable.

@Override
public ExprMacroTable createMacroTable() {
    final List<ExprMacro> exprMacros = new ArrayList<>();
    for (Class<? extends ExprMacroTable.ExprMacro> clazz : ExpressionModule.EXPR_MACROS) {
        exprMacros.add(CalciteTests.INJECTOR.getInstance(clazz));
    }
    exprMacros.add(CalciteTests.INJECTOR.getInstance(LookupExprMacro.class));
    exprMacros.add(new SleepExprMacro());
    return new ExprMacroTable(exprMacros);
}
Also used : ArrayList(java.util.ArrayList) LookupExprMacro(org.apache.druid.query.expression.LookupExprMacro) SleepExprMacro(org.apache.druid.query.expressions.SleepExprMacro) ExprMacro(org.apache.druid.math.expr.ExprMacroTable.ExprMacro) LookupExprMacro(org.apache.druid.query.expression.LookupExprMacro) SleepExprMacro(org.apache.druid.query.expressions.SleepExprMacro) ExprMacroTable(org.apache.druid.math.expr.ExprMacroTable)

Aggregations

ArrayList (java.util.ArrayList)1 ExprMacroTable (org.apache.druid.math.expr.ExprMacroTable)1 ExprMacro (org.apache.druid.math.expr.ExprMacroTable.ExprMacro)1 LookupExprMacro (org.apache.druid.query.expression.LookupExprMacro)1 SleepExprMacro (org.apache.druid.query.expressions.SleepExprMacro)1