@@ -557,7 +557,7 @@ Y_UNIT_TEST_SUITE(DataShardWrite) {
557
557
Y_UNIT_TEST (WriteImmediateBadRequest) {
558
558
auto [runtime, server, sender] = TestCreateServer ();
559
559
560
- auto opts = TShardedTableOptions ().Columns ({{" key" , " Utf8" , true , false }});
560
+ auto opts = TShardedTableOptions ().Columns ({{" key" , " Utf8" , true , true }});
561
561
auto [shards, tableId] = CreateShardedTable (server, sender, " /Root" , " table-1" , opts);
562
562
const ui64 shard = shards[0 ];
563
563
@@ -595,6 +595,19 @@ Y_UNIT_TEST_SUITE(DataShardWrite) {
595
595
UNIT_ASSERT_VALUES_EQUAL (writeResult.GetIssues ().size (), 1 );
596
596
UNIT_ASSERT (writeResult.GetIssues (0 ).message ().Contains (" OPERATION_UNSPECIFIED operation is not supported now" ));
597
597
}
598
+
599
+ Cout << " ========= Send immediate write with NULL value for NOT NULL column=========\n " ;
600
+ {
601
+ TSerializedCellMatrix matrix ({TCell{}}, 1 , 1 );
602
+
603
+ auto evWrite = std::make_unique<NKikimr::NEvents::TDataEvents::TEvWrite>(100 , NKikimrDataEvents::TEvWrite::MODE_IMMEDIATE);
604
+ ui64 payloadIndex = NKikimr::NEvWrite::TPayloadWriter<NKikimr::NEvents::TDataEvents::TEvWrite>(*evWrite).AddDataToPayload (matrix.ReleaseBuffer ());
605
+ evWrite->AddOperation (NKikimrDataEvents::TEvWrite::TOperation::OPERATION_UPSERT, tableId, {1 }, payloadIndex, NKikimrDataEvents::FORMAT_CELLVEC);
606
+
607
+ const auto writeResult = Write (runtime, sender, shard, std::move (evWrite), NKikimrDataEvents::TEvWriteResult::STATUS_BAD_REQUEST);
608
+ UNIT_ASSERT_VALUES_EQUAL (writeResult.GetIssues ().size (), 1 );
609
+ UNIT_ASSERT (writeResult.GetIssues (0 ).message ().Contains (" NULL value for NON NULL column" ));
610
+ }
598
611
}
599
612
600
613
Y_UNIT_TEST (WriteImmediateSeveralOperations) {
0 commit comments