Reply from GCS:
Our development team was able to find the reason why indexes could not be created. As it turned out, in the data you have two records that are not unique and thus create a violation of uniqueness [1] and prevent the creation of an index. This error occurs before the index tries, and therefore index creation fails before it tries.
You can use the query to search for duplicate entries:
SELECT column, count(column) FROM table GROUP BY column HAVING COUNT(column) > 1
You can modify this query to search all keys at the same time or change it after each search. After the duplicates are counted, you can manage these records and start the index creation again.
I hope the Spanner team can fix this error and return the correct error in a future version.
source share