def METHOD_NAME(
    filter_sort_table_obj, column_name, op, value, res_len
):
    table, engine = filter_sort_table_obj
    db_function_lambda = database_functions[op]
    if value:
        db_function = db_function_lambda(column_name, value)
    else:
        db_function = db_function_lambda(column_name)
    relation = table.select()
    query = apply_db_function_as_filter(relation, db_function)
    record_list = execute_pg_query(engine, query)
    if column_name == "array" and value is not None and op not in ["any", "not_any"]:
        value = [int(c) for c in value[1:-1].split(",")]
    assert len(record_list) == res_len
    for record in record_list:
        val_func = op_to_python_func[op]
        actual_value = getattr(record, column_name)
        assert val_func(actual_value, value)