DMN 1.7b1 RTF Avatar
  1. OMG Issue

DMN17 — max() and min() work different in B-FEEL than sum()/mean() regarding null

  • Key: DMN17-84
  • Status: open  
  • Source: Materna Information Communications SE ( Daniel Pfeiffer)
  • Summary:

    In the description of FEEL there is the definition of the three built-in functions sum(), mean(), min() and max() in Table 76 (chapter 10.3.4.4.). All table entries (for min()/max() and sum(), mean()) say "N>0" in the end to clarify, that the numbers must be positive. Therefore an array (or list of parameters) containing at least one null value is resulting in null.

    With B-FEEL that behaviour is adressed but only for sum() and mean(). The second sentence and table in Chapter 11.3 say, that these functions ignore non-numeric parameters:
    FEEL: sum([1, null, 3]) = null
    B-FEEL: sum([1, null, 3]) = 4
    B-FEEL: mean([1, “a”, 3]) = 2

    The two functions min()/max() are not mentioned in the 2nd sentence of 11.3. So the first sentence is used for min()/max() which leads to this results:
    FEEL: min([1, null, 3]) = null
    B-FEEL: min([1, null, 3]) = 0
    In that case we have a different result with the same array (e.g. [1, null, 3] ), although the original definition in table 56 followed the same principels.

    In conclusion i think that would lead to confusion when using these functions.
    A possible soution would be adding min() and max() to the ignore table in chapter 11.3 in the same way like sum() and mean().

  • Reported: DMN 1.6b1 — Thu, 17 Apr 2025 08:08 GMT
  • Updated: Wed, 30 Apr 2025 17:13 GMT