@@ -165,20 +165,24 @@ public void testConsumingAllEvents()
165
165
* The final database table looks like this:
166
166
*
167
167
* > SELECT * FROM products;
168
- * +-----+--------------------+---------------------------------------------------------+--------+
169
- * | id | name | description | weight |
170
- * +-----+--------------------+---------------------------------------------------------+--------+
171
- * | 101 | scooter | Small 2-wheel scooter | 3.14 |
172
- * | 102 | car battery | 12V car battery | 8.1 |
173
- * | 103 | 12-pack drill bits | 12-pack of drill bits with sizes ranging from #40 to #3 | 0.8 |
174
- * | 104 | hammer | 12oz carpenter's hammer | 0.75 |
175
- * | 105 | hammer | 14oz carpenter's hammer | 0.875 |
176
- * | 106 | hammer | 18oz carpenter hammer | 1 |
177
- * | 107 | rocks | box of assorted rocks | 5.1 |
178
- * | 108 | jacket | water resistent black wind breaker | 0.1 |
179
- * | 109 | spare tire | 24 inch spare tire | 22.2 |
180
- * | 110 | jacket | new water resistent white wind breaker | 0.5 |
181
- * +-----+--------------------+---------------------------------------------------------+--------+
168
+ * +-----+--------------------+-------------------------------------------------
169
+ * --------+--------+
170
+ * | id | name | description | weight |
171
+ * +-----+--------------------+-------------------------------------------------
172
+ * --------+--------+
173
+ * | 101 | scooter | Small 2-wheel scooter | 3.14 |
174
+ * | 102 | car battery | 12V car battery | 8.1 |
175
+ * | 103 | 12-pack drill bits | 12-pack of drill bits with sizes ranging from
176
+ * #40 to #3 | 0.8 |
177
+ * | 104 | hammer | 12oz carpenter's hammer | 0.75 |
178
+ * | 105 | hammer | 14oz carpenter's hammer | 0.875 |
179
+ * | 106 | hammer | 18oz carpenter hammer | 1 |
180
+ * | 107 | rocks | box of assorted rocks | 5.1 |
181
+ * | 108 | jacket | water resistent black wind breaker | 0.1 |
182
+ * | 109 | spare tire | 24 inch spare tire | 22.2 |
183
+ * | 110 | jacket | new water resistent white wind breaker | 0.5 |
184
+ * +-----+--------------------+-------------------------------------------------
185
+ * --------+--------+
182
186
* </pre>
183
187
*/
184
188
@@ -246,7 +250,8 @@ public void testStartupFromLatestOffset() throws Exception {
246
250
247
251
// async submit job
248
252
TableResult result = tEnv .executeSql ("INSERT INTO sink SELECT * FROM debezium_source" );
249
- // wait for the source startup, we don't have a better way to wait it, use sleep for now
253
+ // wait for the source startup, we don't have a better way to wait it, use sleep
254
+ // for now
250
255
Thread .sleep (10000L );
251
256
252
257
try (Connection connection = getJdbcConnection (POSTGRES_CONTAINER );
@@ -469,6 +474,7 @@ public void testMetadataColumns() throws Throwable {
469
474
+ " db_name STRING METADATA FROM 'database_name' VIRTUAL,"
470
475
+ " schema_name STRING METADATA VIRTUAL,"
471
476
+ " table_name STRING METADATA VIRTUAL,"
477
+ + " row_kind STRING METADATA FROM 'row_kind' VIRTUAL,"
472
478
+ " id INT NOT NULL,"
473
479
+ " name STRING,"
474
480
+ " description STRING,"
@@ -501,6 +507,7 @@ public void testMetadataColumns() throws Throwable {
501
507
+ " database_name STRING,"
502
508
+ " schema_name STRING,"
503
509
+ " table_name STRING,"
510
+ + " row_kind STRING,"
504
511
+ " id INT,"
505
512
+ " name STRING,"
506
513
+ " description STRING,"
@@ -546,52 +553,52 @@ public void testMetadataColumns() throws Throwable {
546
553
Arrays .asList (
547
554
"+I("
548
555
+ databaseName
549
- + ",inventory,products,101,scooter,Small 2-wheel scooter,3.140)" ,
556
+ + ",inventory,products,+I, 101,scooter,Small 2-wheel scooter,3.140)" ,
550
557
"+I("
551
558
+ databaseName
552
- + ",inventory,products,102,car battery,12V car battery,8.100)" ,
559
+ + ",inventory,products,+I, 102,car battery,12V car battery,8.100)" ,
553
560
"+I("
554
561
+ databaseName
555
- + ",inventory,products,103,12-pack drill bits,12-pack of drill bits with sizes ranging from #40 to #3,0.800)" ,
562
+ + ",inventory,products,+I, 103,12-pack drill bits,12-pack of drill bits with sizes ranging from #40 to #3,0.800)" ,
556
563
"+I("
557
564
+ databaseName
558
- + ",inventory,products,104,hammer,12oz carpenter's hammer,0.750)" ,
565
+ + ",inventory,products,+I, 104,hammer,12oz carpenter's hammer,0.750)" ,
559
566
"+I("
560
567
+ databaseName
561
- + ",inventory,products,105,hammer,14oz carpenter's hammer,0.875)" ,
568
+ + ",inventory,products,+I, 105,hammer,14oz carpenter's hammer,0.875)" ,
562
569
"+I("
563
570
+ databaseName
564
- + ",inventory,products,106,hammer,16oz carpenter's hammer,1.000)" ,
571
+ + ",inventory,products,+I, 106,hammer,16oz carpenter's hammer,1.000)" ,
565
572
"+I("
566
573
+ databaseName
567
- + ",inventory,products,107,rocks,box of assorted rocks,5.300)" ,
574
+ + ",inventory,products,+I, 107,rocks,box of assorted rocks,5.300)" ,
568
575
"+I("
569
576
+ databaseName
570
- + ",inventory,products,108,jacket,water resistent black wind breaker,0.100)" ,
577
+ + ",inventory,products,+I, 108,jacket,water resistent black wind breaker,0.100)" ,
571
578
"+I("
572
579
+ databaseName
573
- + ",inventory,products,109,spare tire,24 inch spare tire,22.200)" ,
580
+ + ",inventory,products,+I, 109,spare tire,24 inch spare tire,22.200)" ,
574
581
"+I("
575
582
+ databaseName
576
- + ",inventory,products,110,jacket,water resistent white wind breaker,0.200)" ,
583
+ + ",inventory,products,+I, 110,jacket,water resistent white wind breaker,0.200)" ,
577
584
"+I("
578
585
+ databaseName
579
- + ",inventory,products,111,scooter,Big 2-wheel scooter ,5.180)" ,
586
+ + ",inventory,products,+I, 111,scooter,Big 2-wheel scooter ,5.180)" ,
580
587
"+U("
581
588
+ databaseName
582
- + ",inventory,products,106,hammer,18oz carpenter hammer,1.000)" ,
589
+ + ",inventory,products,+U, 106,hammer,18oz carpenter hammer,1.000)" ,
583
590
"+U("
584
591
+ databaseName
585
- + ",inventory,products,107,rocks,box of assorted rocks,5.100)" ,
592
+ + ",inventory,products,+U, 107,rocks,box of assorted rocks,5.100)" ,
586
593
"+U("
587
594
+ databaseName
588
- + ",inventory,products,110,jacket,new water resistent white wind breaker,0.500)" ,
595
+ + ",inventory,products,+U, 110,jacket,new water resistent white wind breaker,0.500)" ,
589
596
"+U("
590
597
+ databaseName
591
- + ",inventory,products,111,scooter,Big 2-wheel scooter ,5.170)" ,
598
+ + ",inventory,products,+U, 111,scooter,Big 2-wheel scooter ,5.170)" ,
592
599
"-D("
593
600
+ databaseName
594
- + ",inventory,products,111,scooter,Big 2-wheel scooter ,5.170)" );
601
+ + ",inventory,products,-D, 111,scooter,Big 2-wheel scooter ,5.170)" );
595
602
List <String > actual = TestValuesTableFactory .getRawResultsAsStrings ("sink" );
596
603
Collections .sort (actual );
597
604
Collections .sort (expected );
@@ -679,20 +686,24 @@ public void testUpsertMode() throws Exception {
679
686
* The final database table looks like this:
680
687
*
681
688
* > SELECT * FROM products;
682
- * +-----+--------------------+---------------------------------------------------------+--------+
683
- * | id | name | description | weight |
684
- * +-----+--------------------+---------------------------------------------------------+--------+
685
- * | 101 | scooter | Small 2-wheel scooter | 3.14 |
686
- * | 102 | car battery | 12V car battery | 8.1 |
687
- * | 103 | 12-pack drill bits | 12-pack of drill bits with sizes ranging from #40 to #3 | 0.8 |
688
- * | 104 | hammer | 12oz carpenter's hammer | 0.75 |
689
- * | 105 | hammer | 14oz carpenter's hammer | 0.875 |
690
- * | 106 | hammer | 18oz carpenter hammer | 1 |
691
- * | 107 | rocks | box of assorted rocks | 5.1 |
692
- * | 108 | jacket | water resistent black wind breaker | 0.1 |
693
- * | 109 | spare tire | 24 inch spare tire | 22.2 |
694
- * | 110 | jacket | new water resistent white wind breaker | 0.5 |
695
- * +-----+--------------------+---------------------------------------------------------+--------+
689
+ * +-----+--------------------+-------------------------------------------------
690
+ * --------+--------+
691
+ * | id | name | description | weight |
692
+ * +-----+--------------------+-------------------------------------------------
693
+ * --------+--------+
694
+ * | 101 | scooter | Small 2-wheel scooter | 3.14 |
695
+ * | 102 | car battery | 12V car battery | 8.1 |
696
+ * | 103 | 12-pack drill bits | 12-pack of drill bits with sizes ranging from
697
+ * #40 to #3 | 0.8 |
698
+ * | 104 | hammer | 12oz carpenter's hammer | 0.75 |
699
+ * | 105 | hammer | 14oz carpenter's hammer | 0.875 |
700
+ * | 106 | hammer | 18oz carpenter hammer | 1 |
701
+ * | 107 | rocks | box of assorted rocks | 5.1 |
702
+ * | 108 | jacket | water resistent black wind breaker | 0.1 |
703
+ * | 109 | spare tire | 24 inch spare tire | 22.2 |
704
+ * | 110 | jacket | new water resistent white wind breaker | 0.5 |
705
+ * +-----+--------------------+-------------------------------------------------
706
+ * --------+--------+
696
707
* </pre>
697
708
*/
698
709
0 commit comments