  The decomposition theorem for smooth projective morphisms
$\pi:\mathcal{X}\rightarrow B$ says that $R\pi_*\mathbb{Q}$ decomposes as
$\oplus R^i\pi_*\mathbb{Q}[-i]$. We describe simple examples where it is not
possible to have such a decomposition compatible with cup-product, even after
restriction to Zariski dense open sets of $B$. We prove however that this is
always possible for families of $K3$ surfaces (after shrinking the base), and
show how this result relates to a result by Beauville and the author on the
Chow ring of $K3$ surfaces $S$. We give two proofs of this result, the second
one involving a certain decomposition of the small diagonal in $S^3$ also
proved by Beauville and the author}. We prove an analogue of such a
decomposition of the small diagonal in $X^3$ for Calabi-Yau hypersurfaces $X$
in $\mathbb{P}^n$, which in turn provides strong restrictions on their Chow
ring.
