[ 
https://issues.apache.org/jira/browse/AVRO-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778843#comment-17778843
 ] 

Thun Hak commented on AVRO-3890:
--------------------------------

ok, yes, this would work, but I think adding isImported is more convenient here 
since it would take years before this new syntax is adopted in existing repos. 
I dont think it's reasonable to ask all teams to update their avdls (thousands 
of them) to this new syntax.

> Add feature to know if schema is imported in avdl
> -------------------------------------------------
>
>                 Key: AVRO-3890
>                 URL: https://issues.apache.org/jira/browse/AVRO-3890
>             Project: Apache Avro
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.11.2, 1.11.3
>            Reporter: Thun Hak
>            Priority: Minor
>
> consider the this invoice.avdl:
> {code:java}
> @namespace("purchase")
> protocol InvoiceProtocol{
>    import idl "../customer/data.avdl";  
>    import idl "../product/data.avdl";    
>    record Invoice{
>       timestamp_ms purchaseTime;
>       customer.Customer customer;
>       array<product.Item> items = [];
>    }
> }{code}
> now, if I do this:
> {code:java}
> for(Schema s : protocol.getTypes()){
>    System.out.println(s.getName() + " " + s.isImported());
> }{code}
> this should produce
> {code:java}
> Customer true
> Item true
> Invoice false{code}
> I have some use case where we want to perform operations only to the "main" 
> schema and leave all imported schema alone.
> This feature (s.isImported()) would be really nice to have (if it's not 
> available already).
> Thanks



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to