You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "crepererum (via GitHub)" <gi...@apache.org> on 2023/05/17 12:36:43 UTC

[GitHub] [arrow-rs] crepererum opened a new issue, #4234: `FlightDataEncoder::build` accepts inconsistent schemas

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

   **Describe the bug**
   Looks like 
   
   https://github.com/apache/arrow-rs/blob/8580e858c73eab442deb74d194af31385d78c95c/arrow-flight/src/encode.rs#L149-L152
   
   accepts a stream of `RecordBatches` but then only transmits the first schema:
   
   https://github.com/apache/arrow-rs/blob/8580e858c73eab442deb74d194af31385d78c95c/arrow-flight/src/encode.rs#L260-L264
   
   However the typed interface basically allows the user to pass in `RecordBatches` w/ changing schemas.
   
   **To Reproduce**
   \-
   
   **Expected behavior**
   One of:
   
   - it is technically impossible to change the schema in-flight (i.e. the parameter to `build(...)` should be a batch w/o a schema)
   - it errors when the schema changes
   - it re-transmits the schema when it changes.
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


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


[GitHub] [arrow-rs] alamb commented on issue #4234: `FlightDataEncoder::build` accepts inconsistent schemas

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #4234:
URL: https://github.com/apache/arrow-rs/issues/4234#issuecomment-1554295418

   Maybe there could be a policy set on the encoder that controls the behavior here:
   ```rust
   enum SchemaEnforcement {
     /// Error if a subsequent batch has a different schema (default?)
     Error,
     /// Transmit a new schema message if a subsequent batch has a different schema
     Adapt,
   }
   ```
   
   
     


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