Provide max/min value in a new Windows function
The max value till the current row.
row_max ( Term [, Restart] )
datatable(A:int)[4,5,6,1,3,7,4,8]
| serialize
| extend B = rowmax(A)
| extend C = rowmin(A)
The result of B is: 4,5,6,6,6,7,7,8
The result of C is: 4,4,4,1,1,1,1,1
It is useful for the ip v4 range comparison. Sorted the ip prefixes by the first address and get the max value of its last address for an IP prefix. It will significantly reduce the complexity of the prefix comparison to detect overlap IP prefixes.
2
votes
