``` match (max, min) { (Datum::UInt(m), (Datum::UInt(n)) => ndv = ndv.min(m-n as _)); (Datum::Int(m), (Datum::Int(n)) => ndv = ndv.min(m-n as _); _ => {} } ``` _Originally posted by @sundy-li in https://github.com/databendlabs/databend/pull/17352#discussion_r1956264021_