Copilot commented on code in PR #278:
URL: https://github.com/apache/paimon-cpp/pull/278#discussion_r3942698625


##########
src/paimon/format/blob/blob_file_batch_reader.cpp:
##########
@@ -133,9 +257,14 @@ Status BlobFileBatchReader::SetReadSchema(::ArrowSchema* 
read_schema,
         return Status::Invalid(
             fmt::format("read schema field number {} is not 1", 
arrow_schema->num_fields()));
     }
-    if (!BlobUtils::IsBlobField(arrow_schema->field(0))) {
-        return Status::Invalid(
-            fmt::format("field {} is not BLOB", 
arrow_schema->field(0)->ToString()));
+    std::shared_ptr<arrow::Field> read_field = arrow_schema->field(0);
+    if (!BlobUtils::IsBlobField(read_field) && 
!BlobUtils::IsMapBlobField(read_field)) {
+        return Status::Invalid(fmt::format("field {} is not BLOB", 
read_field->ToString()));
+    }

Review Comment:
   SetReadSchema now accepts both scalar BLOB and MAP<..., BLOB> fields, but 
the validation error message still says "is not BLOB". This can mislead callers 
when they pass the wrong type (e.g., map) and makes debugging harder.



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