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


##########
cpp/src/parquet/arrow/schema_internal.cc:
##########
@@ -117,34 +118,67 @@ Result<std::shared_ptr<ArrowType>> 
MakeArrowTimestamp(const LogicalType& logical
 Result<std::shared_ptr<ArrowType>> FromByteArray(
     const LogicalType& logical_type, const ArrowReaderProperties& 
reader_properties,
     const std::shared_ptr<const ::arrow::KeyValueMetadata>& metadata) {
+  auto binary_type = [&]() -> Result<std::shared_ptr<ArrowType>> {
+    const auto configured_binary_type = reader_properties.binary_type();
+    switch (configured_binary_type) {
+      case ::arrow::Type::BINARY:
+        return ::arrow::binary();
+      case ::arrow::Type::LARGE_BINARY:
+        return ::arrow::large_binary();
+      case ::arrow::Type::BINARY_VIEW:
+        return ::arrow::binary_view();
+      default:
+        return Status::TypeError("Invalid Arrow type for BYTE_ARRAY columns: ",
+                                 
::arrow::internal::ToString(configured_binary_type));
+    }
+  };
+
+  auto utf8_type = [&]() -> Result<std::shared_ptr<ArrowType>> {

Review Comment:
   Hmm, I went up with some prose instead. Can you please take a look?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to