Coverage for mindsdb / api / executor / sql_query / steps / multiple_step.py: 29%
15 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from mindsdb.api.executor.planner.steps import MultipleSteps
3from mindsdb.api.executor.exceptions import NotSupportedYet
5from .base import BaseStepCall
8class MultipleStepsCall(BaseStepCall):
10 bind = MultipleSteps
12 def call(self, step):
14 if step.reduce != 'union':
15 raise NotSupportedYet(f"Only MultipleSteps with type = 'union' is supported. Got '{step.type}'")
16 data = None
17 for substep in step.steps:
18 subdata = self.sql_query.execute_step(substep)
19 if data is None:
20 data = subdata
21 else:
22 data.add_from_result_set(subdata)
24 return data