class_docstr: The result of resolving query inputs to specs.
class_docstr_tok: ["The","result","of","resolving","query","inputs","to","specs","."]
docstr: Returns the query_spec, but if MetricFlowQueryResolution.has_errors was True, raise a RuntimeError.
docstr_tok: ["Returns","the","query_spec",",","but","if","MetricFlowQueryResolution.has_errors","was","True",",","raise","a","RuntimeError","."]
code: def checked_query_spec(self) -> MetricFlowQuerySpec:
      """Returns the query_spec, but if MetricFlowQueryResolution.has_errors was True, raise a RuntimeError."""
      if self.input_to_issue_set.has_issues:
          raise RuntimeError(
              f"Can't get the query spec because errors were present in the resolution:\n"
              f"{mf_pformat(self.input_to_issue_set.has_issues)}"
          )
      if self.query_spec is None:
          raise RuntimeError(
              "If there were no errors, query_spec should have been populated."
          )
      return self.query_spec
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Optional, Sized, Tuple
  from typing_extensions import override
  from metricflow.collection_helpers.merger import Mergeable
  from metricflow.mf_logging.pretty_print import mf_pformat
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_lookup import FilterSpecResolutionLookUp
  from metricflow.query.group_by_item.resolution_dag.dag import GroupByItemResolutionDag
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.query.resolver_inputs.base_resolver_inputs import MetricFlowQueryResolverInput
  from metricflow.specs.specs import MetricFlowQuerySpec
label_desc: Use image node_id 1 for calling the MetricFlowQueryResolution obj's underlying member method code with example usage: obj.checked_query_spec() and returns: self