pitrou commented on code in PR #41546:
URL: https://github.com/apache/arrow/pull/41546#discussion_r1592051310


##########
cpp/src/parquet/encoding_test.cc:
##########
@@ -2160,6 +2165,20 @@ TEST(DeltaLengthByteArrayEncodingAdHoc, 
ArrowBinaryDirectPut) {
 
   auto CheckSeed = [&](std::shared_ptr<::arrow::Array> values) {
     ASSERT_NO_THROW(encoder->Put(*values));
+    int64_t expected_array_size = 0;
+    if (auto* string_array = dynamic_cast<const 
::arrow::StringArray*>(values.get());

Review Comment:
   `StringArray` inherits from `BinaryArray`, so this is not necessary.



##########
cpp/src/parquet/encoding_test.cc:
##########
@@ -2160,6 +2165,20 @@ TEST(DeltaLengthByteArrayEncodingAdHoc, 
ArrowBinaryDirectPut) {
 
   auto CheckSeed = [&](std::shared_ptr<::arrow::Array> values) {
     ASSERT_NO_THROW(encoder->Put(*values));
+    int64_t expected_array_size = 0;
+    if (auto* string_array = dynamic_cast<const 
::arrow::StringArray*>(values.get());

Review Comment:
   In other words, you can just use a single `checked_cast`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to