[
https://issues.apache.org/jira/browse/AVRO-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thun Hak updated AVRO-3890:
---------------------------
Description:
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
was:
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 would be really nice to have (if it's not available already).
Thanks
> 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)