tarantool / cartridge-springdata

Spring Data Tarantool
Other
18 stars 7 forks source link

Partial key search error #65

Open ArtDu opened 2 years ago

ArtDu commented 2 years ago

Partial search does not work with multipart index. Since null is serialized to box.NULL.

repro:

Optional<?> findResponse = repository.findById(
                ClientChannelId.builder()
                        .mdmId(1)
                        .build());

or

Optional<?> findResponse = repository.findById(
                ClientChannelId.builder()
                        .mdmId(1)
                        .channelType(null)
                        .build());
org.springframework.dao.DataRetrievalFailureException: InnerErrorMessage:
str: SelectError: Supplied key type of part 1 does not match index part type: expected string
ArtDu commented 2 years ago

We also put a limit on the selection, which is strange when partial search can find more than one value

first -> {Long@10895} 1 batch_size -> {Long@10895} 1