You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 08:54:25 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #25299: Deprecate hql parameters and synchronize DBApiHook method APIs

uranusjr commented on code in PR #25299:
URL: https://github.com/apache/airflow/pull/25299#discussion_r929702238


##########
airflow/providers/apache/hive/hooks/hive.py:
##########
@@ -981,15 +981,13 @@ def to_csv(
 
         self.log.info("Done. Loaded a total of %s rows.", i)
 
-    def get_records(
-        self, hql: str, schema: str = 'default', hive_conf: Optional[Dict[Any, Any]] = None
-    ) -> Any:
+    def get_records(self, sql: Union[str, List[str]], parameters: Optional[Any] = None, **kwargs) -> Any:

Review Comment:
   ```suggestion
       def get_records(
           self,
           sql: Union[str, List[str]],
           parameters: Optional[Any] = None,
           *,
           schema: str = "default",
           **kwargs,
       ) -> Any:
   ```
   
   We can keep `default` here (instead of needing to dig it out from `kwargs`)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org