Skip to content

Commit

Permalink
Remove Provider Deprecations in Trino (apache#44717)
Browse files Browse the repository at this point in the history
* remove provider deprecations in trino

* remove trino.py and test_trino.py and fix mypy test

* add trino.py and test_trino.py to fix static checks

* fix static checks

---------

Co-authored-by: pratiksha rajendrabhai badheka <pratiksha@DESKTOP-T5HUA05>
  • Loading branch information
Prab-27 and pratiksha rajendrabhai badheka authored Dec 10, 2024
1 parent 1fbd889 commit 43ad2ca
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 232 deletions.
9 changes: 9 additions & 0 deletions providers/src/airflow/providers/trino/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
Changelog
---------

main
....

.. warning::
All deprecated classes, parameters and features have been removed from the {provider_name} provider package.
The following breaking changes were introduced:

* Remove ``TrinoOperator`` class from airflow.providers.trino.operators.trino. Please use ``airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator```

5.9.0
.....

Expand Down
16 changes: 0 additions & 16 deletions providers/src/airflow/providers/trino/operators/__init__.py

This file was deleted.

80 changes: 0 additions & 80 deletions providers/src/airflow/providers/trino/operators/trino.py

This file was deleted.

5 changes: 0 additions & 5 deletions providers/src/airflow/providers/trino/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ integrations:
- /docs/apache-airflow-providers-trino/operators/trino.rst
tags: [software]

operators:
- integration-name: Trino
python-modules:
- airflow.providers.trino.operators.trino

asset-uris:
- schemes: [trino]
handler: airflow.providers.trino.assets.trino.sanitize_uri
Expand Down
4 changes: 2 additions & 2 deletions providers/tests/integration/trino/hooks/test_trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import pytest

from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator
from airflow.providers.trino.hooks.trino import TrinoHook
from airflow.providers.trino.operators.trino import TrinoOperator


@pytest.mark.integration("trino")
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_should_record_records_with_kerberos_auth(self):

@mock.patch.dict("os.environ", AIRFLOW_CONN_TRINO_DEFAULT="trino://airflow@trino:8080/")
def test_openlineage_methods(self):
op = TrinoOperator(task_id="trino_test", sql="SELECT name FROM tpch.sf1.customer LIMIT 3")
op = SQLExecuteQueryOperator(task_id="trino_test", sql="SELECT name FROM tpch.sf1.customer LIMIT 3")
op.execute({})
lineage = op.get_openlineage_facets_on_start()
assert lineage.inputs[0].namespace == "trino://trino:8080"
Expand Down
16 changes: 0 additions & 16 deletions providers/tests/trino/operators/__init__.py

This file was deleted.

113 changes: 0 additions & 113 deletions providers/tests/trino/operators/test_trino.py

This file was deleted.

0 comments on commit 43ad2ca

Please sign in to comment.