tableau icon indicating copy to clipboard operation
tableau copied to clipboard

index(naming): check duplicate index names

Open wenchy opened this issue 4 months ago • 1 comments

There are two kinds of indexes:

  1. Index
  2. OrderededIndex

And they have the same format: (Column1,Column2,...)<ColumnX,ColumnY,...>@IndexName.

In fact, the protoc loader plugin has already checked duplicate index names, see https://github.com/tableauio/loader/pull/127.

But to report errors ahead, we should check duplicate index names on protogen stage, but not only on protoc loader plugin.

wenchy avatar Aug 25 '25 11:08 wenchy

This is hard to implement since we do not get message descriptors when exporting protos, while the default name of index depends on its message descriptor's name when not explicitly specified.

https://github.com/tableauio/loader/blob/32c922717c5b425703d8c5d444070004a8bebc72/internal/index/descriptor.go#L71-L77

Kybxd avatar Aug 26 '25 06:08 Kybxd