On Fri, Oct 20, 2017 at 2:04 AM, Frédéric SOUCHU <
[email protected]> wrote:

> In line with Philip Zeyliger on IDL being a good tool for a human to
> produce schema.
> Key features (IMHO):
> - support for includes (killer feature)
> - simpler syntax (a *lot* less '{' and '['...)
> - simpler comments syntax
>

I'm afraid you're missing my point. I'm not arguing that IDL isn't a "good"
tool for producing schemas. I'm arguing that I don't think, as it is, it
should be the preferred tool for writing schemas.

Implicitly, I'm also extending that to mean we shouldn't currently prefer
to give new features like this only to IDL, unless we want to make the
process for using IDL for schemas cleaner and simpler. If we're willing to
do that, then I have no issues.

I have a toolchain going from IDL to Java + C# classes that wouldn't work
> using JSON schema (the many holes in the AVRO C# side not helping either..).
>

Cool. I helped build something similar and I work with others who use it
regularly.


>  (btw, how did we end up with different json/IDL logical names?!?!)
>

I assume you're referring to the keywords like  "timestamp_ms" and "date"
added to IDL to refer to the "timestamp-millis" and "date" logical types?

These are special keywords, not a general mechanism that produces schemas
with the given logical type so there's no particular reason that they have
to match the logical type that they implement (although it does seem
inconsistent). I looked around AVRO-1684 (
https://issues.apache.org/jira/browse/AVRO-1684) where this was implemented
for some justification, but I didn't find anything.

Suggest to have an 'encoding' attribute to indicate how the default value
> is defined.
> {
>   "type": "bytes",
>   "logicalType": "decimal",
>   "precision": 4,
>   "scale": 2,
>   "default":"3.151351351",
>   "default-encoding":"string" // default encoding being 'AVRO' default
> (e.g. binary)
> }
>

This has the same problem as one of my earlier suggestions; if you change
the meaning of the default field, then older readers will read the schema
with an incorrect default value.

- Bridger Howell

-- 


The information contained in this email message is PRIVATE and intended 
only for the personal and confidential use of the recipient named above. If 
the reader of this message is not the intended recipient or an agent 
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this message in error and that any review, 
dissemination, distribution or copying of this message is strictly 
prohibited.  If you have received this communication in error, please 
notify us immediately by email, and delete the original message.

Reply via email to