henry3260 commented on code in PR #69612:
URL: https://github.com/apache/airflow/pull/69612#discussion_r3579134098


##########
providers/apache/hive/src/airflow/providers/apache/hive/sensors/metastore_partition.py:
##########
@@ -58,28 +70,16 @@ def __init__(
         self.partition_name = partition_name
         self.table = table
         self.schema = schema
-        self.first_poke = True
-        self.conn_id = mysql_conn_id
-        # TODO(aoen): We shouldn't be using SqlSensor here but 
MetastorePartitionSensor.
-        # The problem is the way apply_defaults works isn't compatible with 
inheritance.
-        # The inheritance model needs to be reworked in order to support 
overriding args/
-        # kwargs with arguments here, then 'conn_id' and 'sql' can be passed 
into the
-        # constructor below and apply_defaults will no longer throw an 
exception.
-        super().__init__(**kwargs)
+        super().__init__(conn_id=mysql_conn_id, sql=_METASTORE_PARTITION_SQL, 
**kwargs)

Review Comment:
   > If someone already use `MetastorePartitionSensor(con_id=...)`, it would 
cause an issue.
   > 
   > something like
   > 
   > works better
   
   Thanks for catching this!



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