Into a collection insert two documents: {n: NumberLong(98618)}, {n: NaN}, then run aggregate([\{$group: {_id: null, max: {$max:"$n}}}],{collation:{locale:"en"}}).
In classic engine the result is "NumberLong(98618)" and in SBE it's NaN. The classic result is correct, because we consider NaN to be less than any long.
Into a collection insert two documents: {n: NumberLong(98618)}, {n: NaN}, then run aggregate( [\{$group: {_id: null, max: {$max:"$n}}}] ,{collation:{locale:"en"}}).
In classic engine the result is "NumberLong(98618)" and in SBE it's NaN. The classic result is correct, because we consider NaN to be less than any long.