eladkal commented on code in PR #25939:
URL: https://github.com/apache/airflow/pull/25939#discussion_r954738188


##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -251,3 +251,33 @@ def test_connection(self):
             message = str(e)
 
         return status, message
+
+    @staticmethod
+    def _generate_insert_sql(table, values, target_fields, replace, **kwargs):
+        """
+        Static helper method that generates the INSERT SQL statement.
+        The REPLACE variant is specific to MySQL syntax.
+
+        :param table: Name of the target table
+        :param values: The row to insert into the table
+        :param target_fields: The names of the columns to fill in the table
+        :param replace: Whether to replace instead of insert
+        :return: The generated INSERT or REPLACE SQL statement
+        :rtype: str
+        """
+        placeholders = [
+            "?",

Review Comment:
   thanks
   Note to the comment in 
https://github.com/apache/airflow/pull/25939#discussion_r953958410
   By adding this change the effected providers are depended on a new release 
of common-sql
   so we should edit the provider.yml :
   
https://github.com/apache/airflow/blob/e996a88c7b19a1d30c529f5dd126d0a8871f5ce0/airflow/providers/trino/provider.yaml#L40
   
   and set the dependency as `>=1.2.0`
   
   Otherwise we are risking users installing the new version of Trino provider 
with older version of common.sql provider which will result in code not working
   
   (Same goes for the other effected providers)



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to