Search in sources :

Example 51 with ResolvedFunction

use of io.trino.metadata.ResolvedFunction in project trino by trinodb.

the class AbstractOperatorBenchmark method createAggregationFunction.

protected final BenchmarkAggregationFunction createAggregationFunction(String name, Type... argumentTypes) {
    ResolvedFunction resolvedFunction = localQueryRunner.getMetadata().resolveFunction(session, QualifiedName.of(name), fromTypes(argumentTypes));
    AggregationMetadata aggregationMetadata = localQueryRunner.getFunctionManager().getAggregateFunctionImplementation(resolvedFunction);
    return new BenchmarkAggregationFunction(resolvedFunction, aggregationMetadata);
}
Also used : ResolvedFunction(io.trino.metadata.ResolvedFunction) AggregationMetadata(io.trino.operator.aggregation.AggregationMetadata)

Aggregations

ResolvedFunction (io.trino.metadata.ResolvedFunction)51 Test (org.testng.annotations.Test)31 WindowNode (io.trino.sql.planner.plan.WindowNode)21 ImmutableList (com.google.common.collect.ImmutableList)20 ImmutableMap (com.google.common.collect.ImmutableMap)20 Symbol (io.trino.sql.planner.Symbol)20 TypeSignatureProvider.fromTypes (io.trino.sql.analyzer.TypeSignatureProvider.fromTypes)18 DEFAULT_FRAME (io.trino.sql.planner.plan.WindowNode.Frame.DEFAULT_FRAME)18 QualifiedName (io.trino.sql.tree.QualifiedName)18 Optional (java.util.Optional)18 OrderingScheme (io.trino.sql.planner.OrderingScheme)17 PlanMatchPattern.values (io.trino.sql.planner.assertions.PlanMatchPattern.values)17 BaseRuleTest (io.trino.sql.planner.iterative.rule.test.BaseRuleTest)17 ComparisonExpression (io.trino.sql.tree.ComparisonExpression)15 FunctionCall (io.trino.sql.tree.FunctionCall)14 SortOrder (io.trino.spi.connector.SortOrder)12 Type (io.trino.spi.type.Type)12 Expression (io.trino.sql.tree.Expression)11 BIGINT (io.trino.spi.type.BigintType.BIGINT)10 PlanMatchPattern.topNRanking (io.trino.sql.planner.assertions.PlanMatchPattern.topNRanking)9