> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# none_match

> 判断数组中是否没有元素匹配给定的谓词条件。

判断数组中是否没有元素匹配谓词中 (predicate) 指定的条件。

* 如果没有任何元素匹配或数组为空，则返回 True (1)。

* 如果有一个或多个元素匹配，则返回 False (0)。

* 如果数组中有元素为 NULL，而其他元素都不匹配，则返回 NULL。

## 语法

```Haskell theme={null}
none_match(lambda_function, arr1, arr2...)
```

判断数组中是否没有元素匹配 Lambda 表达式中指定的条件。

## 参数说明

* `arr`: 进行判断的数组。

* `lambda_function`: 作为匹配条件的 Lambda 表达式。

## 返回值说明

返回 BOOLEAN 类型的值。

## 使用说明

* 关于 Lambda 表达式的使用注意事项，参见 [array\_map()](/documents/cn/4.2/sql-reference/sql-functions/array-functions/array_map.md)。
* 如果输入的数组为 NULL 或者 Lambda 表达式的结果为 NULL，则返回 NULL。
* 如果第一个数组为空，则返回 `true`。
* `none_match()` 是 [any\_match()](/documents/cn/4.2/sql-reference/sql-functions/array-functions/any_match.md) 的取反，`none_match(f, arr)` 与 `NOT any_match(f, arr)` 的结果相同。
* 如果要将该函数应用在 MAP 上，可以将 `none_match((k,v)->k>v,map)` 改写为 `none_match(map_values(transform_values((k,v)->k>v, map)))`。例如，`select none_match(map_values(transform_values((k,v)->k>v, map{2:1})));` 返回 0。

## 示例

判断数组 `x` 中是否没有元素小于数组 `y` 中的元素。

```Plain theme={null}
select none_match((x,y) -> x < y, [1,2,8], [4,5,6]);
+---------------------------------------------------+
| none_match((x, y) -> x < y, [1, 2, 8], [4, 5, 6]) |
+---------------------------------------------------+
|                                                 0 |
+---------------------------------------------------+

select none_match((x,y) -> x < y, [11,12,8], [4,5,6]);
+-----------------------------------------------------+
| none_match((x, y) -> x < y, [11, 12, 8], [4, 5, 6]) |
+-----------------------------------------------------+
|                                                   1 |
+-----------------------------------------------------+

select none_match((x,y) -> x < y, [11,12,null], [4,5,6]);
+--------------------------------------------------------+
| none_match((x, y) -> x < y, [11, 12, NULL], [4, 5, 6]) |
+--------------------------------------------------------+
|                                                   NULL |
+--------------------------------------------------------+

select none_match((x,y) -> x < y, [], []);
+-------------------------------------+
| none_match((x, y) -> x < y, [], []) |
+-------------------------------------+
|                                   1 |
+-------------------------------------+

select none_match((x,y) -> x < y, null, [4,5,6]);
+----------------------------------------------+
| none_match((x, y) -> x < y, NULL, [4, 5, 6]) |
+----------------------------------------------+
|                                         NULL |
+----------------------------------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.