paleolimbot commented on code in PR #41765:
URL: https://github.com/apache/arrow/pull/41765#discussion_r2016944278
##########
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:
I went with "undefined logical type" and added a note about the possibility
of a corrupt footer ("unknown" is definitely more intuitive but that concept
means something different in types.cc/h)
--
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]