File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
sqlmesh/core/engine_adapter
tests/core/engine_adapter/integration Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -701,9 +701,13 @@ def _record_execution_stats(
701701 # - [^"] matches any single character except a double-quote
702702 # - | or
703703 # - "" matches two sequential double-quotes
704- is_ctas = re .match (
704+ is_created = re .match (
705705 r'Table ([a-zA-Z0-9_$]+|"(?:[^"]|"")+") successfully created\.' , results_str
706706 )
707- if is_ctas :
707+ is_already_exists = re .match (
708+ r'([a-zA-Z0-9_$]+|"(?:[^"]|"")+") already exists, statement succeeded\.' ,
709+ results_str ,
710+ )
711+ if is_created or is_already_exists :
708712 return
709713 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
Original file line number Diff line number Diff line change @@ -2457,7 +2457,9 @@ def capture_execution_stats(
24572457 assert len (physical_layer_results .tables ) == len (physical_layer_results .non_temp_tables ) == 3
24582458
24592459 if ctx .engine_adapter .SUPPORTS_QUERY_EXECUTION_TRACKING :
2460- assert actual_execution_stats ["seed_model" ].total_rows_processed == 7
2460+ assert actual_execution_stats ["seed_model" ].total_rows_processed == (
2461+ None if ctx .mark .startswith ("snowflake" ) else 7
2462+ )
24612463 assert actual_execution_stats ["incremental_model" ].total_rows_processed == 7
24622464 # snowflake doesn't track rows for CTAS
24632465 assert actual_execution_stats ["full_model" ].total_rows_processed == (
You can’t perform that action at this time.
0 commit comments