Gradient filter should only average values from cells of the same dimensionality
The Gradient of Unstructured Data Set filter does a local gradient computations in each cell and averages those results on points. Right now, each point averages gradients from all incident cells. However, it is of dubious physical or practical use to combine the gradients of cells of different dimensionality (e.g. mixing 3D polyhedra with 2D polygons).
One place where this comes up is a mesh might combine both internal grid cells and boundary elements. Because gradients use finite differences and boundary elements are flat, the gradient through the boundary elements is not captured and the average incorrectly drops the gradient in that direction. (See, for example, this email thread: http://public.kitware.com/pipermail/paraview/2016-September/038129.html).
Thus, the behavior of the gradient of unstructured data set filter would be closer to what is expected if it determined the highest dimensionality of cells on each point and only averaged gradient values from cells of the highest dimensionality.