This is an automated email from the ASF dual-hosted git repository.

gopidesu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 44dab1075ca Fix LLMSchemaCompareOperator source count for multi-table 
db inputs (#63466)
44dab1075ca is described below

commit 44dab1075ca8a42b7dafdc99543e8fee9479a592
Author: GPK <[email protected]>
AuthorDate: Thu Mar 12 19:46:23 2026 +0000

    Fix LLMSchemaCompareOperator source count for multi-table db inputs (#63466)
    
    * Fix LLMSchemaCompareOperator source count for multi-table db inputs
    
    * Update 
providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
---
 .../src/airflow/providers/common/ai/operators/llm_schema_compare.py   | 2 +-
 .../ai/tests/unit/common/ai/operators/test_llm_schema_compare.py      | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/providers/common/ai/src/airflow/providers/common/ai/operators/llm_schema_compare.py
 
b/providers/common/ai/src/airflow/providers/common/ai/operators/llm_schema_compare.py
index 5e13eb55966..b07413d136e 100644
--- 
a/providers/common/ai/src/airflow/providers/common/ai/operators/llm_schema_compare.py
+++ 
b/providers/common/ai/src/airflow/providers/common/ai/operators/llm_schema_compare.py
@@ -140,7 +140,7 @@ class LLMSchemaCompareOperator(LLMOperator):
         if self.db_conn_ids and not self.table_names:
             raise ValueError("'table_names' is required when using 
'db_conn_ids'.")
 
-        total_sources = len(self.db_conn_ids) + len(self.data_sources)
+        total_sources = len(self.db_conn_ids) * len(self.table_names) + 
len(self.data_sources)
         if total_sources < 2:
             raise ValueError(
                 "Provide at-least two combinations of 'db_conn_ids' and 
'table_names' or 'data_sources' "
diff --git 
a/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py 
b/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
index 784d94eb7fc..5515cce57f1 100644
--- 
a/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
+++ 
b/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
@@ -124,6 +124,10 @@ class TestLLMSchemaCompareOperator:
                 },
                 id="one_db_conn_plus_one_datasource",
             ),
+            pytest.param(
+                {"db_conn_ids": ["postgres_default"], "table_names": 
["orders", "customers"]},
+                id="one_db_conn_plus_two_tables",
+            ),
             pytest.param(
                 {
                     "db_conn_ids": ["postgres_default", "snowflake_default"],

Reply via email to