You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mzabaluev (via GitHub)" <gi...@apache.org> on 2026/03/24 13:48:37 UTC

[I] Avro decoder can't handle a reader schema with no fields [arrow-rs]

mzabaluev opened a new issue, #9608:
URL: https://github.com/apache/arrow-rs/issues/9608

   **Describe the bug**
   An application that needs to count records in an Avro file without decoding any fields may pass a reader schema to that effect.
   In the current implementation, `RecordDecoder` creates a `RecordBatch` from decoded column arrays without the `row_count` option, which results in an error when there are no columns to decide the number of rows from.
   
   **To Reproduce**
   Create an arrow-avro reader with a reader schema matching the top-level record of the Avro content (e.g. an OCF file) schema, but listing no fields, e.g.
   
   ```json
   {
       "type": "record",
       "name": "topLevelRecord",
       "fields": []
   }
   ```
   
   Use the appropriate read API to read batches from the file.
   The error is reported: "Invalid argument error: must either specify a row count or at least one column"
   
   **Expected behavior**
   The reader retrieves batches with no columns, but numbers of rows as decided by the batch size option and other flags affecting batch composition (i.e. the row counts should be the same as if the full writer schema was read).
   


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Avro decoder can't handle a reader schema with no fields [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #9608: Avro decoder can't handle a reader schema with no fields
URL: https://github.com/apache/arrow-rs/issues/9608


-- 
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-unsubscribe@arrow.apache.org

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