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


##########
cpp/src/parquet/arrow/schema_internal.cc:
##########
@@ -191,10 +191,20 @@ Result<std::shared_ptr<ArrowType>> FromInt64(const 
LogicalType& logical_type) {
 Result<std::shared_ptr<ArrowType>> GetArrowType(
     Type::type physical_type, const LogicalType& logical_type, int type_length,
     const ArrowReaderProperties& reader_properties) {
-  if (logical_type.is_invalid() || logical_type.is_null()) {
+  if (logical_type.is_null()) {
     return ::arrow::null();
   }
 
+  if (logical_type.is_invalid()) {
+    if (reader_properties.convert_undefined_logical_types()) {
+      return GetArrowType(physical_type, *NoLogicalType::Make(), type_length,
+                          reader_properties);
+    }
+
+    return Status::NotImplemented(
+        "logical type Undefined with convert_undefined_logical_types=false");

Review Comment:
   "unknown or undefined logical type"
   
   (this could really be an unknown logical type, or a corrupt Thrift 
definition as in `schema_test.cc`)



-- 
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