@@ -596,3 +596,35 @@ TEST(ColumnsCase, UnmatchedBrackets) {
596
596
ASSERT_EQ (nullptr , CreateColumnByType (" Array(LowCardinality(Nullable(FixedString(10000))" ));
597
597
ASSERT_EQ (nullptr , CreateColumnByType (" Array(LowCardinality(Nullable(FixedString(10000)))" ));
598
598
}
599
+
600
+ class ColumnsCaseWithName : public ::testing::TestWithParam<const char * /* Column Type String*/ >
601
+ {};
602
+
603
+ TEST_P (ColumnsCaseWithName, CreateColumnByType)
604
+ {
605
+ const auto col = CreateColumnByType (GetParam ());
606
+ ASSERT_NE (nullptr , col);
607
+ EXPECT_EQ (col->GetType ().GetName (), GetParam ());
608
+ }
609
+
610
+ INSTANTIATE_TEST_CASE_P (Basic, ColumnsCaseWithName, ::testing::Values(
611
+ " Int8" , " Int16" , " Int32" , " Int64" ,
612
+ " UInt8" , " UInt16" , " UInt32" , " UInt64" ,
613
+ " String" , " Date" , " DateTime"
614
+ ));
615
+
616
+ INSTANTIATE_TEST_CASE_P (Parametrized, ColumnsCaseWithName, ::testing::Values(
617
+ " FixedString(0)" , " FixedString(10000)" ,
618
+ " DateTime('UTC')" , " DateTime64(3, 'UTC')" ,
619
+ " Decimal(9,3)" , " Decimal(18,3)" ,
620
+ " Enum8('ONE' = 1, 'TWO' = 2)" ,
621
+ " Enum16('ONE' = 1, 'TWO' = 2, 'THREE' = 3, 'FOUR' = 4)"
622
+ ));
623
+
624
+
625
+ INSTANTIATE_TEST_CASE_P (Nested, ColumnsCaseWithName, ::testing::Values(
626
+ " Nullable(FixedString(10000))" ,
627
+ " Nullable(LowCardinality(FixedString(10000)))" ,
628
+ " Array(Nullable(LowCardinality(FixedString(10000))))" ,
629
+ " Array(Enum8('ONE' = 1, 'TWO' = 2))"
630
+ ));
0 commit comments