Why are some aggregates treated differently in the RHS of a rule in the model clause?
In the Oracle Database SQL Language Reference one can read


  NULLIF(expr1, expr2)
  ...
  The NULLIF function is logically equivalent to the following CASE expression:
      CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END


but Oracle 11.2.0.3 on Linux gives the following



SQL&gtselect *
  2  from (select level k, 100 v from dual connect by level&lt=2)
  3  model return updated rows
  4  dimension by (k)
  5  measures (v, 0 shr)
  6  rules ( shr[any] = CASE WHEN sum(v)[any] = 0 THEN NULL ELSE sum(v)[any] END);


         K          V        SHR
---------- ---------- ----------
         1        100        200
         2        100        200

SQL&gt select *
  2  from (select level k, 100 v from dual connect by level&lt=2)
  3  model return updated rows
  4  dimension by (k)
  5  measures (v, 0 shr)
  6  rules ( shr[any] = nullif(sum(v)[any], 0));

         K          V        SHR
---------- ---------- ----------
         1        100        400
         2        100        400

SQL&gt


Therefor this is (at least a documentation :-) bug in 11r2

One gets the same results in Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production