XD-DENG commented on code in PR #64174:
URL: https://github.com/apache/airflow/pull/64174#discussion_r2983344994
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc_script.py:
##########
@@ -26,7 +26,12 @@
try:
from pyspark.sql import SparkSession
except ImportError:
- pass
+ from airflow.providers.common.compat.sdk import
AirflowOptionalProviderFeatureException
Review Comment:
I understand this change is about `pyspark` not being installed.
My point is mainly about whether the execution of this script needs to
import separately from `airflow`.
But if it's the convention adopted widely in other packages, I'm fine with
it.
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc_script.py:
##########
@@ -26,7 +26,12 @@
try:
from pyspark.sql import SparkSession
except ImportError:
- pass
+ from airflow.providers.common.compat.sdk import
AirflowOptionalProviderFeatureException
Review Comment:
I understand this change is about `pyspark` not being installed.
My point is mainly about whether the execution of this script needs to
import separately from `airflow`.
But if it's the convention adopted widely in other provider packages, I'm
fine with it.
--
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]