Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7.0
    • Component/s: c++
    • Labels:

      Description

      This patch adds support for reading and resolving schemas that use namespaces for named types. Looking for a code review and application of the patch to codebase.

      Node is modified to take an additional NamespaceConcept attribute in the template parameters. An additional stack has been added to the compiler context to track when namespaces have been entered or left for resolving further types/symbols. Symbolic resolution is now done against the "fullname" of the type and not just by the name. Some string gymnastics were needed in other areas of codegen in order to handle the new symbols.

      Added very trivial tests to AvrogencppTests for schema generation by avrogencpp and added a test schema (tweet) that has namespaces, a record definition inside a namespace, and then a later symbolic reference by name within an outer namespace. Also patched to work with gen-cppcode.py output. Note that NodeImpl::printBasicInfo intentionally does not output the namespace since that caused downstream breakage of gen-cppcode.py expected format.

      github project was forked at https://github.com/spindlelabs/avro

      1. AVRO-1026-2.patch
        33 kB
        Thiruvalluvan M. G.
      2. AVRO-1026_with_AVRO-956.patch
        38 kB
        Keh-Li Sheng
      3. AVRO-1026_json.patch
        1 kB
        Keh-Li Sheng
      4. AVRO-1026.patch
        32 kB
        Keh-Li Sheng

        Issue Links

          Activity

          Keh-Li Sheng created issue -
          Keh-Li Sheng made changes -
          Field Original Value New Value
          Attachment AVRO-1026.patch [ 12514153 ]
          Keh-Li Sheng made changes -
          Link This issue is related to AVRO-410 [ AVRO-410 ]
          Keh-Li Sheng made changes -
          Attachment AVRO-1026_json.patch [ 12514502 ]
          Keh-Li Sheng made changes -
          Attachment AVRO-1026_with_AVRO-956.patch [ 12514693 ]
          Keh-Li Sheng made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Fix Version/s 1.6.3 [ 12319869 ]
          Doug Cutting made changes -
          Fix Version/s 1.7.0 [ 12318848 ]
          Fix Version/s 1.6.3 [ 12319869 ]
          Thiruvalluvan M. G. made changes -
          Attachment AVRO-1026-2.patch [ 12528101 ]
          Thiruvalluvan M. G. made changes -
          Attachment AVRO-1095.patch [ 12528202 ]
          Thiruvalluvan M. G. made changes -
          Attachment AVRO-1095.patch [ 12528202 ]
          Thiruvalluvan M. G. made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Doug Cutting made changes -
          Assignee Keh-Li Sheng [ kehli ]
          Simon Yun made changes -
          Description This patch adds support for reading and resolving schemas that use namespaces for named types. Looking for a code review and application of the patch to codebase.

          Node is modified to take an additional NamespaceConcept attribute in the template parameters. An additional stack has been added to the compiler context to track when namespaces have been entered or left for resolving further types/symbols. Symbolic resolution is now done against the "fullname" of the type and not just by the name. Some string gymnastics were needed in other areas of codegen in order to handle the new symbols.

          Added very trivial tests to AvrogencppTests for schema generation by avrogencpp and added a test schema (tweet) that has namespaces, a record definition inside a namespace, and then a later symbolic reference by name within an outer namespace. Also patched to work with gen-cppcode.py output. Note that NodeImpl::printBasicInfo intentionally does not output the namespace since that caused downstream breakage of gen-cppcode.py expected format.

          github project was forked at https://github.com/bifflabs/avro
          This patch adds support for reading and resolving schemas that use namespaces for named types. Looking for a code review and application of the patch to codebase.

          Node is modified to take an additional NamespaceConcept attribute in the template parameters. An additional stack has been added to the compiler context to track when namespaces have been entered or left for resolving further types/symbols. Symbolic resolution is now done against the "fullname" of the type and not just by the name. Some string gymnastics were needed in other areas of codegen in order to handle the new symbols.

          Added very trivial tests to AvrogencppTests for schema generation by avrogencpp and added a test schema (tweet) that has namespaces, a record definition inside a namespace, and then a later symbolic reference by name within an outer namespace. Also patched to work with gen-cppcode.py output. Note that NodeImpl::printBasicInfo intentionally does not output the namespace since that caused downstream breakage of gen-cppcode.py expected format.

          github project was forked at https://github.com/spindlelabs/avro
          Doug Cutting made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Keh-Li Sheng
              Reporter:
              Keh-Li Sheng
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development