XD-DENG commented on code in PR #64174:
URL: https://github.com/apache/airflow/pull/64174#discussion_r2983202048
##########
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:
Is it ever possible this script is going to be executed in an environment
where Airflow may not be installed? e.g. this script doesn't import Airflow in
anyway so far.
If that's possible, using a plain `ImportError` may be better? And doesn't
lose any insight compared with using `AirflowOptionalProviderFeatureException`
--
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]