[ 
https://issues.apache.org/jira/browse/AVRO-3601?focusedWorklogId=800491&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-800491
 ]

ASF GitHub Bot logged work on AVRO-3601:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Aug/22 06:38
            Start Date: 15/Aug/22 06:38
    Worklog Time Spent: 10m 
      Work Description: martin-g commented on code in PR #1826:
URL: https://github.com/apache/avro/pull/1826#discussion_r945457612


##########
lang/c++/test/unittest.cc:
##########
@@ -452,7 +457,14 @@ struct TestSchema {
                                             customAttributes);
         std::string expectedJsonWithCustomAttribute =
         "{\"type\": \"record\", \"name\": \"Test\",\"fields\": "
-        "[{\"name\": \"f1\", \"type\": \"long\",\"extra field\": \"1\"}]}";
+        "[{\"name\": \"f1\", \"type\": \"long\", "
+        "\"arrayField\": \"[1]\", "
+        "\"booleanField\": \"true\", "
+        "\"mapField\": \"{\\\"key1\\\":\\\"value1\\\", 
\\\"key2\\\":\\\"value2\\\"}\", "
+        "\"nullField\": \"null\", "
+        "\"numberField\": \"1.23\", "
+        "\"stringField\": \"\\\"field value with \\\"double quotes\\\"\\\"\""

Review Comment:
   The Avro spec does not say anything about the possible value types of the 
custom attributes/metadata.
   
   Until AVRO-3547 the C++ SDK didn't support it at all. (The Rust SDK still 
does not support this too. I 
[expect](https://github.com/lerouxrgd/rsgen-avro/issues/32#issuecomment-1212123036)
 a user to open a ticket/PR this week).
   With AVRO-3601 we [found 
out](https://github.com/apache/avro/pull/1820#issuecomment-1211711217) that 
using JsonDom.hh for the custom attributes is not recommended, thus the 
string-based approach.
   
   I guess 1.11.2/1.12.0 will be released in several months, so whoever is 
interested in better handling of the custom attributes should step up and do 
it. Here I just tried to fix the broken installation of C++ SDK 1.11.1.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 800491)
    Time Spent: 4.5h  (was: 4h 20m)

> C++ API header contains breaking include
> ----------------------------------------
>
>                 Key: AVRO-3601
>                 URL: https://issues.apache.org/jira/browse/AVRO-3601
>             Project: Apache Avro
>          Issue Type: Bug
>            Reporter: Mike Ruffing
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> Problem file/line: 
> https://github.com/apache/avro/blob/master/lang/c%2B%2B/api/CustomFields.hh#L24
> Steps to reproduce:
>  * Download AVRO version 1.11.1
>  * Execute {{./build.sh install}} (from the {{lang/c++ directory}})
>  * Navigate to the installed {{include}} directory
>  * Verify this file (and path) {{"../impl/json/JsonDom.hh"}} does NOT exists 
> in the installed {{include}} directory
> Relates to: https://issues.apache.org/jira/browse/AVRO-3547



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

Reply via email to