Repository navigation
Commit 2777c66
committed
fix(scheduler): emit CreateNode before evaluating annotated Python models
On the first build of a materialized Python model (or after a breaking
change), SnapshotEvaluator._evaluate_snapshot() previously ran CREATE TABLE
inside adapter.transaction() before invoking Python model code, keeping the
session idle in transaction and holding an AccessExclusiveLock for the full
Python execution regardless of pre_ping.
Extend Scheduler._dag() to emit a separate CreateNode before EvaluateNode
for annotated materialized Python models without pre_statements or
post_statements, matching how INCREMENTAL_BY_TIME_RANGE models already
separate table creation from evaluation.
Part of #6252
Signed-off-by: Vamsi-klu <nrvamsi13@gmail.com>1 parent 2a157fd commit 2777c66
2 files changed
Lines changed: 392 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
725 | 733 | | |
726 | | - | |
727 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
728 | 737 | | |
729 | 738 | | |
730 | 739 | | |
| |||
0 commit comments