bug: IVF_SQ and IVF_RQ on a UInt8 column train the whole IVF model before rejecting the dtype
Description
build_vector_index_impl in rust/lance/src/index/vector.rs checks the vector column's element type up front for the flat and PQ index types, with an arm that returns Build Vector Index: invalid data type: .... The IvfSq and IvfRq arms do not check it: they go straight to the builder, and the dtype is rejected much later by the quantizer's own build ("SQ builder: unsupported data type", "Unsupported data type").
Where that costs something is Hamming. With a UInt8 column and metric_type = Hamming, kmeans accepts the dtype, so the build samples the training data and trains the entire IVF model before the SQ quantizer refuses it. With L2 the failure lands earlier, in train_ivf_model, but still after the training sample is read, and the message talks about the metric rather than the index type's requirement.
Expected behavior
Reject a non-float element type for SQ and RQ where the other index types are checked, before any data is read.
Lance version
13.0.0-beta.4 (main)
Language binding
Rust
Source: lance-format/lance