shahar1 commented on code in PR #67113:
URL: https://github.com/apache/airflow/pull/67113#discussion_r3443062815


##########
providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -190,7 +196,15 @@ def __init__(
         # Use sentinel pattern to distinguish "not provided" from "explicitly 
provided"
         if use_legacy_sql is _UNSET:
             value = self._get_field("use_legacy_sql", _UNSET)
-            self.use_legacy_sql: bool = value if value is not None else True
+            if value is None:
+                warnings.warn(
+                    BIGQUERY_LEGACY_SQL_DEFAULT_WARNING,
+                    AirflowProviderDeprecationWarning,
+                    stacklevel=2,
+                )
+                self.use_legacy_sql = True
+            else:
+                self.use_legacy_sql = value

Review Comment:
   In the deferrable path of the operators (`BigQueryCheckOperator`, 
`BigQueryValueCheckOperator`, and `BigQueryIntervalCheckOperator`), the param 
`use_legacy_sql` is not passed explicitly - so this warning will be hit in each 
time it gets there. Please handle it, and I think that we're good.



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