File tree Expand file tree Collapse file tree
sqlmesh/core/engine_adapter
tests/core/engine_adapter/integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -700,9 +700,13 @@ def _record_execution_stats(
700700 # - [^"] matches any single character except a double-quote
701701 # - | or
702702 # - "" matches two sequential double-quotes
703- is_ctas = re .match (
703+ is_created = re .match (
704704 r'Table ([a-zA-Z0-9_$]+|"(?:[^"]|"")+") successfully created\.' , results_str
705705 )
706- if is_ctas :
706+ is_already_exists = re .match (
707+ r'([a-zA-Z0-9_$]+|"(?:[^"]|"")+") already exists, statement succeeded\.' ,
708+ results_str ,
709+ )
710+ if is_created or is_already_exists :
707711 return
708712 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
Original file line number Diff line number Diff line change @@ -2418,7 +2418,9 @@ def capture_execution_stats(
24182418 assert len (physical_layer_results .tables ) == len (physical_layer_results .non_temp_tables ) == 3
24192419
24202420 if ctx .engine_adapter .SUPPORTS_QUERY_EXECUTION_TRACKING :
2421- assert actual_execution_stats ["seed_model" ].total_rows_processed == 7
2421+ assert actual_execution_stats ["seed_model" ].total_rows_processed == (
2422+ None if ctx .mark .startswith ("snowflake" ) else 7
2423+ )
24222424 assert actual_execution_stats ["incremental_model" ].total_rows_processed == 7
24232425 # snowflake doesn't track rows for CTAS
24242426 assert actual_execution_stats ["full_model" ].total_rows_processed == (
You can’t perform that action at this time.
0 commit comments