@@ -2623,6 +2623,41 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
2623
2623
2624
2624
}
2625
2625
2626
+ Y_UNIT_TEST (MultiInsertWithSinks) {
2627
+ NKikimrConfig::TAppConfig appConfig;
2628
+ appConfig.MutableTableServiceConfig ()->SetEnableOlapSink (true );
2629
+ auto settings = TKikimrSettings ()
2630
+ .SetAppConfig (appConfig)
2631
+ .SetWithSampleTables (false );
2632
+ TKikimrRunner kikimr (settings);
2633
+
2634
+ TLocalHelper (kikimr).CreateTestOlapTable ();
2635
+
2636
+ auto db = kikimr.GetQueryClient ();
2637
+
2638
+ auto result = db.ExecuteQuery (R"(
2639
+ INSERT INTO `/Root/olapStore/olapTable` (timestamp, uid, resource_id) VALUES (Timestamp('1970-01-01T00:00:00Z'), 'a', '0');
2640
+ INSERT INTO `/Root/olapStore/olapTable` (timestamp, uid, resource_id) VALUES (Timestamp('1970-01-01T00:00:01Z'), 'b', 't');
2641
+ INSERT INTO `/Root/olapStore/olapTable` (timestamp, uid, resource_id) VALUES (Timestamp('1970-01-01T00:00:02Z'), 'c', 'test');
2642
+ )" , NYdb::NQuery::TTxControl::BeginTx ().CommitTx ()).ExtractValueSync ();
2643
+
2644
+ UNIT_ASSERT_C (result.IsSuccess (), result.GetIssues ().ToString ());
2645
+
2646
+ {
2647
+ auto it = db.StreamExecuteQuery (R"(
2648
+ --!syntax_v1
2649
+
2650
+ SELECT
2651
+ *
2652
+ FROM `/Root/olapStore/olapTable` ORDER BY uid
2653
+ )" , NYdb::NQuery::TTxControl::BeginTx ().CommitTx ()).GetValueSync ();
2654
+
2655
+ UNIT_ASSERT_C (it.IsSuccess (), it.GetIssues ().ToString ());
2656
+ TString result = StreamResultToYson (it);
2657
+ CompareYson (result, R"( [[#;#;["0"];0u;"a"];[#;#;["t"];1000000u;"b"];[#;#;["test"];2000000u;"c"]])" );
2658
+ }
2659
+ }
2660
+
2626
2661
}
2627
2662
2628
2663
}
0 commit comments