Extend aggregation_request_helper::validate() to handle PQS validation

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently for pipeline commands, the PQS validation occurs outside of the aggregation_request_helper::validate() function in 2 places:
      1. PipelineCommand::parseForExplain()
      2. ClusterPipelineCommand::parseForExplain()

      We should be able to centralize these checks into aggergation_request_helper::validate() in this form:

      void validatePipeline(..., bool isClusterPipeline) {
          if (isClusterPipeline) {
              clusterPQSValidation();
          } else {
              regularPipelinePQSValidation();
          }
          ... // rest of the validation code
      }
      

      This will also require identifying the other users of aggregation_request_helper::parseFromBSON() which calls validate() and ensure we do the appropriate handling in those cases.

            Assignee:
            Unassigned
            Reporter:
            Naafiyan Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: