Open-EO / openeo-processes

Interoperable processes for openEO's big Earth observation cloud processing.
https://processes.openeo.org
Apache License 2.0
49 stars 15 forks source link

is_valid: Remove support for arrays #440

Closed LukeWeidenwalker closed 1 year ago

LukeWeidenwalker commented 1 year ago

Process ID: is_valid

Describe the issue: In order for is_valid to be applicable across a dimension of a datacube through a reducer, we cannot fulfil the requirement is_valid(x = [null,null]) => true, because under the hood the dimension ends up being an array too, so is_valid(x = [null,null]) => [False, False]. Removing support for checking validity of arrays would make our implementation easier. My impression is that the purpose of is_valid is to filter array elements anyways, so don't think this would be very detrimental at all to the utility of this process.

Proposed solution: Update the schema for x to something like:

"type": [
    "number",
    "boolean",
    "string",
    "object",
    "null"
]

An optional extension would be to also drop support for object.

Additional context: We've already removed support for arrays and objects from comparisons in https://github.com/Open-EO/openeo-processes/pull/422

LukeWeidenwalker commented 1 year ago

Apologies, the labels bug and patch got added automatically, don't mean to suggest this is a bug!

m-mohr commented 1 year ago

@LukeWeidenwalker I think you are misunderstanding the example. Please keep in mind you don't need to check the array content. An array or object is always valid data: "Thus all arrays, objects and strings are valid, regardless of their content."