Skip to content

Commit 1706e5e

Browse files
committed
Seeds are now handled in evaluator
1 parent af0f2cc commit 1706e5e

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

sqlmesh/core/scheduler.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,21 +534,21 @@ def run_node(node: SchedulingUnit) -> None:
534534
)
535535

536536
self.console.update_snapshot_evaluation_progress(
537-
snapshot,
538-
batched_intervals[snapshot][node.batch_index],
539-
node.batch_index,
540-
evaluation_duration_ms,
541-
num_audits - num_audits_failed,
542-
num_audits_failed,
543-
execution_stats=execution_stats,
537+
snapshot,
538+
batched_intervals[snapshot][node.batch_index],
539+
node.batch_index,
540+
evaluation_duration_ms,
541+
num_audits - num_audits_failed,
542+
num_audits_failed,
543+
execution_stats=execution_stats,
544544
)
545545
elif isinstance(node, CreateNode):
546546
self.snapshot_evaluator.create_snapshot(
547547
snapshot=snapshot,
548548
snapshots=self.snapshots_by_name,
549549
deployability_index=deployability_index,
550550
allow_destructive_snapshots=allow_destructive_snapshots or set(),
551-
)
551+
)
552552

553553
try:
554554
with self.snapshot_evaluator.concurrent_context():

tests/core/engine_adapter/integration/test_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,13 +2413,12 @@ def capture_execution_stats(
24132413
assert len(physical_layer_results.tables) == len(physical_layer_results.non_temp_tables) == 3
24142414

24152415
if ctx.engine_adapter.SUPPORTS_QUERY_EXECUTION_TRACKING:
2416+
assert actual_execution_stats["seed_model"].total_rows_processed == 7
24162417
assert actual_execution_stats["incremental_model"].total_rows_processed == 7
24172418
# snowflake doesn't track rows for CTAS
24182419
assert actual_execution_stats["full_model"].total_rows_processed == (
24192420
None if ctx.mark.startswith("snowflake") else 3
24202421
)
2421-
# seed rows aren't tracked
2422-
assert actual_execution_stats["seed_model"].total_rows_processed is None
24232422

24242423
if ctx.mark.startswith("bigquery") or ctx.mark.startswith("databricks"):
24252424
assert actual_execution_stats["incremental_model"].total_bytes_processed is not None

tests/core/test_snapshot_evaluator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ def test_evaluate_materialized_view_with_partitioned_by_cluster_by(
606606

607607
execute_mock.assert_has_calls(
608608
[
609-
call("CREATE SCHEMA IF NOT EXISTS `sqlmesh__test_schema`", False),
610609
call(
611610
f"CREATE MATERIALIZED VIEW `sqlmesh__test_schema`.`test_schema__test_model__{snapshot.version}` PARTITION BY `a` CLUSTER BY `b` AS SELECT `a` AS `a`, `b` AS `b` FROM `tbl` AS `tbl`",
612611
False,

0 commit comments

Comments
 (0)