Copilot commented on code in PR #4687:
URL: https://github.com/apache/arrow-adbc/pull/4687#discussion_r3793399295


##########
c/driver/postgresql/postgres_type.h:
##########
@@ -354,6 +354,11 @@ class PostgresType {
         break;
     }
 
+    // Don't add POSTGRESQL:type to top-level field (which is the schema)
+    if (type_id_ != PostgresTypeId::kRecord || !field_name_.empty()) {
+      NANOARROW_RETURN_NOT_OK(AddTypeMetadata(schema));

Review Comment:
   This uses an empty field name as a proxy for “top-level schema,” but 
`PqResultArrayReader` calls `child_type.SetSchema(...)` for each result field 
before setting its name separately (`result_reader.cc:206-208`). Consequently, 
a composite/record column returned through the bind or no-COPY path is mistaken 
for the root and does not receive `POSTGRESQL:type`, so the new metadata is not 
present on all result fields. Please make root-vs-field explicit, or pass the 
field name into `SetSchema` in that caller.



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