From e4df864846e833dda4669e190669a2db5b365c62 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 16 Mar 2022 13:12:50 +0100 Subject: [PATCH] `array_contains` and `array_find`: Clarify that giving `null` as `value` always returns `false` or `null` respectively, also fixed the incorrect examples. #348 --- CHANGELOG.md | 1 + array_contains.json | 6 +++--- array_find.json | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e80ca4..c3ed5504 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Clarified that a `TargetDimensionExists` exception is thrown if the target dimension exists. - `apply` and `array_apply`: Fixed broken references to the `absolute` process - `apply_neighborhood`: Parameter `overlap` was optional but had no default value and no schena for the default value defined. +- `array_contains` and `array_find`: Clarify that giving `null` as `value` always returns `false` or `null` respectively, also fixed the incorrect examples. [#348](https://github.com/Open-EO/openeo-processes/issues/348) - `array_interpolate_linear`: Return value was incorrectly specified as `number` or `null`. It must return an array instead. [#333](https://github.com/Open-EO/openeo-processes/issues/333) - `rename_labels`: Clarified that the `LabelsNotEnumerated` exception is thrown if `source` is empty instead of if `target` is empty. [#321](https://github.com/Open-EO/openeo-processes/issues/321) - `round`: Clarify that the rounding for ties applies not only for integers. [#326](https://github.com/Open-EO/openeo-processes/issues/326) diff --git a/array_contains.json b/array_contains.json index 745b62b3..a61622bc 100644 --- a/array_contains.json +++ b/array_contains.json @@ -20,7 +20,7 @@ }, { "name": "value", - "description": "Value to find in `data`.", + "description": "Value to find in `data`. If the value is `null`, this process returns always `false`.", "schema": { "description": "Any data type is allowed." } @@ -75,7 +75,7 @@ ], "value": null }, - "returns": true + "returns": false }, { "arguments": { @@ -167,4 +167,4 @@ "result": true } } -} \ No newline at end of file +} diff --git a/array_find.json b/array_find.json index c95f2628..a579a428 100644 --- a/array_find.json +++ b/array_find.json @@ -19,7 +19,7 @@ }, { "name": "value", - "description": "Value to find in `data`.", + "description": "Value to find in `data`. If the value is `null`, this process returns always `null`.", "schema": { "description": "Any data type is allowed." } @@ -106,7 +106,7 @@ ], "value": null }, - "returns": 1 + "returns": null }, { "arguments": { @@ -168,4 +168,4 @@ "title": "Find no-data values in arrays" } ] -} \ No newline at end of file +}