| """Picks DB vs Tabular executor based on the source_type of the IR's source. | |
| This is the only place in the structured query path where the schema/tabular | |
| distinction matters. Every step before this is source-type-agnostic. | |
| """ | |
| from ...catalog.models import Catalog | |
| from ..ir.models import QueryIR | |
| from .base import BaseExecutor | |
| class ExecutorDispatcher: | |
| def __init__(self, catalog: Catalog) -> None: | |
| self._catalog = catalog | |
| def pick(self, ir: QueryIR) -> BaseExecutor: | |
| raise NotImplementedError | |