  Let $p$ be a prime and let $S$ be a non-empty subset of $\mathbb{F}_p$.
Generalizing a result of Green and Tao on the equidistribution of high-rank
polynomials over finite fields, we show that if $P: \mathbb{F}_p^n \rightarrow
\mathbb{F}_p$ is a polynomial and its restriction to $S^n$ does not take each
value with approximately the same frequency, then there exists a polynomial
$P_0: \mathbb{F}_p^n \rightarrow \mathbb{F}_p$ that vanishes on $S^n$, such
that the polynomial $P-P_0$ has bounded rank. Our argument uses two black
boxes: that a tensor with high partition rank has high analytic rank and that a
tensor with high essential partition rank has high disjoint partition rank.
