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