@@ -154,6 +154,7 @@ TEST_P(RoundtripCase, Ring) {
154154 std::vector<ColumnPoint::ValueType> ring{{0.1 , 0.2 }, {0.3 , 0.4 }};
155155 col->Append (ring);
156156 }
157+
157158 auto result_typed = RoundtripColumnValues (*client_, col)->AsStrict <ColumnRing>();
158159 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
159160}
@@ -174,6 +175,7 @@ TEST_P(RoundtripCase, Polygon) {
174175 {{{0.1 , 0.2 }, {0.3 , 0.4 }}, {{0.5 , 0.6 }, {0.7 , 0.8 }}};
175176 col->Append (polygon);
176177 }
178+
177179 auto result_typed = RoundtripColumnValues (*client_, col)->AsStrict <ColumnPolygon>();
178180 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
179181}
@@ -196,18 +198,21 @@ TEST_P(RoundtripCase, MultiPolygon) {
196198 {{{1.1 , 1.2 }, {1.3 , 1.4 }}, {{1.5 , 1.6 }, {1.7 , 1.8 }}}};
197199 col->Append (multi_polygon);
198200 }
201+
199202 auto result_typed = RoundtripColumnValues (*client_, col)->AsStrict <ColumnMultiPolygon>();
200203 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
201204}
202205
203206TEST_P (RoundtripCase, LowCardinalityTString) {
204207 using TestColumn = ColumnLowCardinalityT<ColumnString>;
205208 auto col = std::make_shared<TestColumn>();
209+
206210 col->Append (" abc" );
207211 col->Append (" def" );
208212 col->Append (" abc" );
209213 col->Append (" abc" );
210- auto result_typed = WrapColumn<TestColumn>(RoundtripColumnValues (*client_, col));
214+
215+ auto result_typed = RoundtripColumnValues (*client_, col)->As <TestColumn>();
211216 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
212217}
213218
@@ -224,25 +229,29 @@ TEST_P(RoundtripCase, LowCardinalityTNullableString) {
224229 col->Append (std::nullopt );
225230 col->Append (" foobar" );
226231
227- auto result_typed = WrapColumn<TestColumn>( RoundtripColumnValues (*client_, col));
232+ auto result_typed = RoundtripColumnValues (*client_, col)-> As <TestColumn>( );
228233 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
229234}
230235
231236TEST_P (RoundtripCase, ArrayTNullableString) {
232237 using TestColumn = ColumnArrayT<ColumnNullableT<ColumnString>>;
233238 auto col = std::make_shared<TestColumn>();
239+
234240 col->Append ({std::nullopt , std::nullopt , std::nullopt });
235241 col->Append (std::vector<std::optional<std::string>>{" abc" , std::nullopt });
236- auto result_typed = WrapColumn<TestColumn>(RoundtripColumnValues (*client_, col));
242+
243+ auto result_typed = RoundtripColumnValues (*client_, col)->As <TestColumn>();
237244 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
238245}
239246
240247TEST_P (RoundtripCase, TupleTNullableString) {
241248 using TestColumn = ColumnTupleT<ColumnNullableT<ColumnString>>;
242249 auto col = std::make_shared<TestColumn>(std::make_tuple (std::make_shared<ColumnNullableT<ColumnString>>()));
250+
243251 col->Append (std::make_tuple (std::nullopt ));
244252 col->Append (std::make_tuple (" abc" ));
245- auto result_typed = WrapColumn<TestColumn>(RoundtripColumnValues (*client_, col));
253+
254+ auto result_typed = RoundtripColumnValues (*client_, col)->As <TestColumn>();
246255 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
247256}
248257
@@ -253,48 +262,54 @@ TEST_P(RoundtripCase, Map_TString_TNullableString) {
253262 auto col = std::make_shared<TestColumn>(std::make_shared<Key>(), std::make_shared<Value>());
254263 {
255264 std::map<std::string, std::optional<std::string>> value;
256- value[" 1" ]= " one" ;
257- value[" 2" ]= std::nullopt ;
265+ value[" 1" ] = " one" ;
266+ value[" 2" ] = std::nullopt ;
258267 col->Append (value);
259268 }
260269 {
261270 std::map<std::string, std::optional<std::string>> value;
262- value[" 4" ]= " one" ;
263- value[" 2" ]= std::nullopt ;
271+ value[" 4" ] = " one" ;
272+ value[" 2" ] = std::nullopt ;
264273 col->Append (value);
265274 }
266- auto result_typed = WrapColumn<TestColumn>( RoundtripColumnValues (*client_, col));
275+ auto result_typed = RoundtripColumnValues (*client_, col)-> As <TestColumn>( );
267276 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
268277}
269278
270279TEST_P (RoundtripCase, Map_LowCardinalityTString_LowCardinalityTNullableString) {
271280 using Key = ColumnLowCardinalityT<ColumnString>;
272281 using Value = ColumnLowCardinalityT<ColumnNullableT<ColumnString>>;
273282 using TestColumn = ColumnMapT<Key, Value>;
283+
274284 auto col = std::make_shared<TestColumn>(std::make_shared<Key>(), std::make_shared<Value>());
275285 {
276286 std::map<std::string, std::optional<std::string>> value;
277- value[" 1" ]= " one" ;
278- value[" 2" ]= std::nullopt ;
287+
288+ value[" 1" ] = " one" ;
289+ value[" 2" ] = std::nullopt ;
290+
279291 col->Append (value);
280292 }
281293 {
282294 std::map<std::string, std::optional<std::string>> value;
283- value[" 4" ]= " one" ;
284- value[" 2" ]= std::nullopt ;
295+
296+ value[" 4" ] = " one" ;
297+ value[" 2" ] = std::nullopt ;
298+
285299 col->Append (value);
286300 }
287- auto result_typed = WrapColumn<TestColumn>( RoundtripColumnValues (*client_, col));
301+ auto result_typed = RoundtripColumnValues (*client_, col)-> As <TestColumn>( );
288302 EXPECT_TRUE (CompareRecursive (*col, *result_typed));
289303}
290304
291305TEST_P (RoundtripCase, RoundtripArrayLowCardinalityTString) {
292306 using TestColumn = ColumnArrayT<ColumnLowCardinalityT<ColumnString>>;
293307 auto array = std::make_shared<TestColumn>();
308+
294309 array->Append (std::vector<std::string>{});
295310 array->Append (std::vector<std::string>{});
296311
297- auto result_typed = WrapColumn<TestColumn>( RoundtripColumnValues (*client_, array));
312+ auto result_typed = RoundtripColumnValues (*client_, array)-> As <TestColumn>( );
298313 EXPECT_TRUE (CompareRecursive (*array, *result_typed));
299314}
300315
@@ -311,6 +326,7 @@ INSTANTIATE_TEST_SUITE_P(
311326 ClientOptions (LocalHostEndpoint)
312327 .SetPingBeforeQuery(true )
313328 .SetBakcwardCompatibilityFeatureLowCardinalityAsWrappedColumn(false ),
329+
314330 ClientOptions(LocalHostEndpoint)
315331 .SetPingBeforeQuery(false )
316332 .SetCompressionMethod(CompressionMethod::LZ4)
0 commit comments