You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thun Hak (Jira)" <ji...@apache.org> on 2023/10/22 19:13:00 UTC
[jira] [Created] (AVRO-3890) Add feature to know if schema is imported in avdl
Thun Hak created AVRO-3890:
------------------------------
Summary: 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.3, 1.11.2
Reporter: Thun Hak
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
--
This message was sent by Atlassian Jira
(v8.20.10#820010)