Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74894

Header includes in files generated from accumulator spec in IDL

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Integration
    • ALL
    • QE 2023-03-20, QE 2023-04-03

      For the $percentile accumulator we are using an IDL spec (accumulator_percentile.idl) and we need to include 'accumulator_percentile.h' into the generated cpp file to perform some additional custom validation of the arguments. However, the generated code adds the include into 'accumulator_percentile_gen.h' rather than 'accumulator_percentile_gen.cpp' making it impossible to use types – e.g. PercentileAlgorithmTypeEnum enum – defined via the IDL, in accumulator_percentile.h.

      The reason to include into the generated header is that the purpose of the includes is likely to be the custom types for the "types" fields. So we cannot just move the include into the generated cpp file but we can add another field, something like "cpp_impl_includes" for headers that are meant to be included only into the generated cpp file.

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: