fn ensure_constant_vector(vector: &VectorRef) -> Result<()>
Ensure the vector is constant and not empty (i.e., all values are identical)