[ https://issues.apache.org/jira/browse/AVRO-2748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047663#comment-17047663 ]
Erik Erlandson commented on AVRO-2748: -------------------------------------- In a sense, resolving "int" against ["int", "string"] is not a type-safe match. I can see why someone might want to allow it, but I can also imagine not wanting it to succeed, for exactly the reason you showed - it can fail partway through a data set. It makes me wonder if there should be two modes of schema resolution. The mode that exists, which is sort of like "runtime type checking" and another mode that is closer to "compile-time type checking" in the sense that it (1) happens once, up front, and (2) if it does succeed, you can safely assume all your data reads will succeed. > python schema resolution occurs on every read > --------------------------------------------- > > Key: AVRO-2748 > URL: https://issues.apache.org/jira/browse/AVRO-2748 > Project: Apache Avro > Issue Type: Bug > Components: python > Affects Versions: 1.9.2 > Reporter: Erik Erlandson > Priority: Minor > > In python, the schema resolution appears to be happening on each read > operation. I'm not an avro expert but in my perusing through the python io > code I haven't yet noticed a reason that the schema resolution couldn't > happen once up front, during the construction of DataFileReader, when it > first loads the write_schema. -- This message was sent by Atlassian Jira (v8.3.4#803005)