Skip to content

Commit

Permalink
Fix bug in merger
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Lavrukov authored and nvamelichev committed Dec 27, 2024
1 parent 0fbaf0d commit 09dca29
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private MergingState doTransition(MergingState state, Statement.QueryType nextQu
private static YdbRepository.Query convertInsertToUpsert(YdbRepository.Query<?> query) {
var type = getEntityClass(query);
var schema = EntitySchema.of(type);
var tableDescriptor = TableDescriptor.from(schema);
var tableDescriptor = convertQueryToYqlStatement(query).getTableDescriptor();
var statement = new UpsertYqlStatement<>(tableDescriptor, schema);
return new YdbRepository.Query<>(statement, query.getValues().get(0));
}
Expand All @@ -173,7 +173,7 @@ private static YdbRepository.Query convertInsertToUpsert(YdbRepository.Query<?>
private static YdbRepository.Query convertInsertToDelete(YdbRepository.Query<?> query) {
var type = getEntityClass(query);
var schema = EntitySchema.of(type);
var tableDescriptor = TableDescriptor.from(schema);
var tableDescriptor = convertQueryToYqlStatement(query).getTableDescriptor();
var statement = new DeleteByIdStatement<>(tableDescriptor, schema);
return new YdbRepository.Query<>(statement, getEntityId(query));
}
Expand Down

0 comments on commit 09dca29

Please sign in to comment.