class_docstr: Resolves inputs to a query (e.g. metrics, group by items into concrete specs.
class_docstr_tok: ["Resolves","inputs","to","a","query","(","e.g",".","metrics",",","group","by","items","into","concrete","specs","."]
code: def _resolve_limit_input(
      limit_input: ResolverInputForLimit,
      query_resolution_path: MetricFlowQueryResolutionPath,
  ) -> ResolveLimitResult:
      limit = limit_input.limit
      if limit is not None and limit < 0:
          return ResolveLimitResult(
              limit=limit,
              input_to_issue_set_mapping=InputToIssueSetMapping.from_one_item(
                  resolver_input=limit_input,
                  issue_set=MetricFlowQueryResolutionIssueSet.from_issue(
                      InvalidLimitIssue.from_parameters(
                          limit=limit,
                          query_resolution_path=query_resolution_path,
                      ),
                  ),
              ),
          )
      return ResolveLimitResult(
          limit=limit,
          input_to_issue_set_mapping=InputToIssueSetMapping.empty_instance(),
      )
  
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from dbt_semantic_interfaces.references import MetricReference
  from metricflow.dag.dag_to_text import dag_as_text
  from metricflow.mf_logging.pretty_print import mf_pformat
  from metricflow.mf_logging.runtime import log_runtime
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.naming.metric_scheme import MetricNamingScheme
  from metricflow.query.group_by_item.filter_spec_resolution.filter_pattern_factory import WhereFilterPatternFactory
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_lookup import FilterSpecResolutionLookUp
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_resolver import WhereFilterSpecResolver
  from metricflow.query.group_by_item.group_by_item_resolver import GroupByItemResolution, GroupByItemResolver
  from metricflow.query.group_by_item.resolution_dag.dag import GroupByItemResolutionDag
  from metricflow.query.group_by_item.resolution_dag.dag_builder import GroupByItemResolutionDagBuilder
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.query_resolution_node import QueryGroupByItemResolutionNode
  from metricflow.query.group_by_item.resolution_path import MetricFlowQueryResolutionPath
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.query.issues.parsing.invalid_limit import InvalidLimitIssue
  from metricflow.query.issues.parsing.invalid_metric import InvalidMetricIssue
  from metricflow.query.issues.parsing.invalid_min_max_only import InvalidMinMaxOnlyIssue
  from metricflow.query.issues.parsing.invalid_order import InvalidOrderByItemIssue
  from metricflow.query.query_resolution import InputToIssueSetMapping, InputToIssueSetMappingItem, MetricFlowQueryResolution
  from metricflow.query.resolver_inputs.query_resolver_inputs import ResolverInputForGroupByItem, ResolverInputForLimit, ResolverInputForMetric, ResolverInputForMinMaxOnly, ResolverInputForOrderByItem, ResolverInputForQuery, ResolverInputForQueryLevelWhereFilterIntersection, ResolverInputForWhereFilterIntersection
  from metricflow.query.suggestion_generator import QueryItemSuggestionGenerator
  from metricflow.query.validation_rules.query_validator import PostResolutionQueryValidator
  from metricflow.specs.patterns.match_list_pattern import MatchListSpecPattern
  from metricflow.specs.specs import InstanceSpec, LinkableInstanceSpec, LinkableSpecSet, MetricFlowQuerySpec, MetricSpec, OrderBySpec
label_desc: Use image node_id 6 for calling the MetricFlowQueryResolver obj's underlying member method code with example usage: obj._resolve_limit_input(limit_input, query_resolution_path) and returns: ResolveLimitResult, ResolveLimitResult