Skip to content

Commit

Permalink
Rename SelectSqlQueryToDataFrameTask to `SelectSqlQueryToDataTableT…
Browse files Browse the repository at this point in the history
…ask`.
  • Loading branch information
plypaul committed May 31, 2024
1 parent 5488ce7 commit 6969321
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions metricflow/execution/dataflow_to_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from metricflow.execution.convert_to_execution_plan import ConvertToExecutionPlanResult
from metricflow.execution.execution_plan import (
ExecutionPlan,
SelectSqlQueryToDataFrameTask,
SelectSqlQueryToDataTableTask,
SelectSqlQueryToTableTask,
)
from metricflow.plan_conversion.convert_to_sql_plan import ConvertToSqlPlanResult
Expand Down Expand Up @@ -79,7 +79,7 @@ def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode
render_sql_result = self._render_sql(convert_to_sql_plan_result)
execution_plan = ExecutionPlan(
leaf_tasks=(
SelectSqlQueryToDataFrameTask(
SelectSqlQueryToDataTableTask(
sql_client=self._sql_client,
sql_query=render_sql_result.sql,
bind_parameters=render_sql_result.bind_parameters,
Expand Down
2 changes: 1 addition & 1 deletion metricflow/execution/execution_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class TaskExecutionResult:
df: Optional[MetricFlowDataTable] = None


class SelectSqlQueryToDataFrameTask(ExecutionPlanTask):
class SelectSqlQueryToDataTableTask(ExecutionPlanTask):
"""A task that runs a SELECT and puts that result into a data_table."""

def __init__( # noqa: D107
Expand Down
4 changes: 2 additions & 2 deletions tests_metricflow/execution/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from metricflow.data_table.mf_table import MetricFlowDataTable
from metricflow.execution.execution_plan import (
ExecutionPlan,
SelectSqlQueryToDataFrameTask,
SelectSqlQueryToDataTableTask,
SelectSqlQueryToTableTask,
)
from metricflow.execution.executor import SequentialPlanExecutor
Expand All @@ -18,7 +18,7 @@


def test_read_sql_task(sql_client: SqlClient) -> None: # noqa: D103
task = SelectSqlQueryToDataFrameTask(sql_client, "SELECT 1 AS foo", SqlBindParameters())
task = SelectSqlQueryToDataTableTask(sql_client, "SELECT 1 AS foo", SqlBindParameters())
execution_plan = ExecutionPlan(leaf_tasks=[task], dag_id=DagId.from_str("plan0"))

results = SequentialPlanExecutor().execute_plan(execution_plan)
Expand Down

0 comments on commit 6969321

Please sign in to comment.