Table:
CREATE TABLE `/Root/DefaultColumnAndBulkUpsert` (
Key Uint32 NOT NULL,
Value String DEFAULT "Default value",
PRIMARY KEY (Key),
);
BulkUpsert fills NULLs for the Value column and not the "Default value" literal:
auto rowsBuilder = NYdb::TValueBuilder();
rowsBuilder.BeginList();
for (ui32 i = 10; i <= 15; ++i) {
rowsBuilder.AddListItem()
.BeginStruct()
.AddMember("Key")
.Uint32(i)
.EndStruct();
}
rowsBuilder.EndList();
tableClient.BulkUpsert("/Root/DefaultColumnAndBulkUpsert", rowsBuilder.Build());
- Add a new
LOG_WARN when rows from BulkUpsert does not have DEFAULT columns. We're going to find out if anyone is using this bug as a feature.
- Add a new feature flag
DisableBulkUpsertWithoutDefaults to disable writing like above.