use of io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder in project trino by trinodb.
the class ParametricAggregation method getFunctionDependencies.
@Override
public FunctionDependencyDeclaration getFunctionDependencies() {
FunctionDependencyDeclarationBuilder builder = FunctionDependencyDeclaration.builder();
declareDependencies(builder, implementations.getExactImplementations().values());
declareDependencies(builder, implementations.getSpecializedImplementations());
declareDependencies(builder, implementations.getGenericImplementations());
return builder.build();
}
use of io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder in project trino by trinodb.
the class RowToRowCast method getFunctionDependencies.
@Override
public FunctionDependencyDeclaration getFunctionDependencies(BoundSignature boundSignature) {
List<Type> toTypes = boundSignature.getReturnType().getTypeParameters();
List<Type> fromTypes = boundSignature.getArgumentType(0).getTypeParameters();
FunctionDependencyDeclarationBuilder builder = FunctionDependencyDeclaration.builder();
for (int i = 0; i < toTypes.size(); i++) {
Type fromElementType = fromTypes.get(i);
Type toElementType = toTypes.get(i);
builder.addCast(fromElementType, toElementType);
}
return builder.build();
}
use of io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder in project trino by trinodb.
the class FormatFunction method getFunctionDependencies.
@Override
public FunctionDependencyDeclaration getFunctionDependencies(BoundSignature boundSignature) {
FunctionDependencyDeclarationBuilder builder = FunctionDependencyDeclaration.builder();
boundSignature.getArgumentTypes().get(1).getTypeParameters().forEach(type -> addDependencies(builder, type));
return builder.build();
}
use of io.trino.metadata.FunctionDependencyDeclaration.FunctionDependencyDeclarationBuilder in project trino by trinodb.
the class ParametricScalar method getFunctionDependencies.
@Override
public FunctionDependencyDeclaration getFunctionDependencies() {
FunctionDependencyDeclarationBuilder builder = FunctionDependencyDeclaration.builder();
declareDependencies(builder, implementations.getExactImplementations().values());
declareDependencies(builder, implementations.getSpecializedImplementations());
declareDependencies(builder, implementations.getGenericImplementations());
return builder.build();
}
Aggregations