getChan commented on PR #17861:
URL: https://github.com/apache/datafusion/pull/17861#issuecomment-3513022241

   > Hey @getChan, I came across this same issue on Friday while working on an 
implementation of the writer. The `arrow-avro` reader can absolutely handle a 
schema with a custom name; there are thorough tests in the crate that 
demonstrate this. What I think is going on here is that the name is lost in the 
Original Avro -> DataFusion SchemaRef -> Projected Avro process. The 
`AvroSchema::try_from()` in AvroSource generates a projected schema without the 
name. We need that optimized schema in order to provide the ReaderBuilder with 
the correct projection. In other words, it works fine when passing a named 
schema directly to the ReaderBuilder, but not one that has been funneled 
through the optimizations of DataFusion via Arrow, where some contextual 
information is lost.
   > 
   > @jecsand838 any thoughts on this?
   
   Thanks for help.
   as you said. my Implementation injects a schema into arrow-avro to perform 
projection, but doing so causes the metadata to be lost.
   As a result, if I provide a schema for projection I cannot read the custom 
record name; conversely, if I don't provide a schema so I can read the custom 
record name, I can't perform projection.
   I'll try to find another solution.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to