use of org.apache.flink.table.operations.FilterQueryOperation in project flink by apache.
the class OperationTreeBuilder method filter.
public QueryOperation filter(Expression condition, QueryOperation child) {
ExpressionResolver resolver = getResolver(child);
ResolvedExpression resolvedExpression = resolveSingleExpression(condition, resolver);
DataType conditionType = resolvedExpression.getOutputDataType();
if (!conditionType.getLogicalType().is(BOOLEAN)) {
throw new ValidationException("Filter operator requires a boolean expression as input," + " but $condition is of type " + conditionType);
}
return new FilterQueryOperation(resolvedExpression, child);
}
Aggregations