aneesh-joseph commented on a change in pull request #9973:
URL: https://github.com/apache/airflow/pull/9973#discussion_r628834607



##########
File path: airflow/models/dagcode.py
##########
@@ -147,7 +148,7 @@ def has_dag(cls, fileloc: str, session=None) -> bool:
         :param session: ORM Session
         """
         fileloc_hash = cls.dag_fileloc_hash(fileloc)
-        return session.query(exists().where(cls.fileloc_hash == 
fileloc_hash)).scalar()
+        return session.query(literal(True)).filter(cls.fileloc_hash == 
fileloc_hash).one_or_none() is not None

Review comment:
       mssql doesn't support exists in select query , i.e it doesn't support
   
   ```
   SELECT EXISTS (SELECT *
   FROM dag_code
   WHERE dag_code.fileloc_hash = 15056821532142474) AS anon_1
   ```
   
   https://github.com/apache/airflow/pull/9973#issuecomment-665492863




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to