[function] fix implementation and test of the derivative of discerete grid view function