You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Koosha Hosseiny (Jira)" <ji...@apache.org> on 2020/07/02 13:19:00 UTC

[jira] [Updated] (AVRO-2877) Avro java library includes $ in namespace, it fails in avro cpp

     [ https://issues.apache.org/jira/browse/AVRO-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koosha Hosseiny updated AVRO-2877:
----------------------------------
    Description: 
Hello!

This is the code from `ProtobufData.java`:
{code:java}
String d1 = (!outer.isEmpty() || inner.length() != 0 ? "." : "");
String d2 = (!outer.isEmpty() && inner.length() != 0 ? "$" : "");
return p + d1 + outer + d2 + inner;
{code}
From [here.|https://github.com/apache/avro/blob/2c7b9af7d5ba35afe9cf84eae3b273a6df0612b1/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java#L249]

Despite the fact that avro specification disallows $ in namespace. Hence, the output from java library can not be imported to a client using avro's cpp implementation such as BigQuery. I'm not sure what the fix should look like?

  was:
Hello!

This is the code from `ProtobufData.java`:

 
{code:java}
String d1 = (!outer.isEmpty() || inner.length() != 0 ? "." : "");
String d2 = (!outer.isEmpty() && inner.length() != 0 ? "$" : "");
return p + d1 + outer + d2 + inner;
{code}
 

From [here|https://github.com/apache/avro/blob/2c7b9af7d5ba35afe9cf84eae3b273a6df0612b1/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java#L249]

Despite the fact that avro specification disallows $ in namespace. Hence, the output from java library can not be imported to a client using avro's cpp implementation such as BigQuery.

I'm not sure what the fix should look like?


> Avro java library includes $ in namespace, it fails in avro cpp
> ---------------------------------------------------------------
>
>                 Key: AVRO-2877
>                 URL: https://issues.apache.org/jira/browse/AVRO-2877
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Koosha Hosseiny
>            Priority: Minor
>
> Hello!
> This is the code from `ProtobufData.java`:
> {code:java}
> String d1 = (!outer.isEmpty() || inner.length() != 0 ? "." : "");
> String d2 = (!outer.isEmpty() && inner.length() != 0 ? "$" : "");
> return p + d1 + outer + d2 + inner;
> {code}
> From [here.|https://github.com/apache/avro/blob/2c7b9af7d5ba35afe9cf84eae3b273a6df0612b1/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java#L249]
> Despite the fact that avro specification disallows $ in namespace. Hence, the output from java library can not be imported to a client using avro's cpp implementation such as BigQuery. I'm not sure what the fix should look like?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)