From b9a2ae799da0aa506c0ad1853a6528286f493171 Mon Sep 17 00:00:00 2001 From: Faisal Date: Wed, 10 Jul 2024 16:25:44 -0300 Subject: [PATCH] switching version check to spark session (#321) * switching version check to spark session * bumping version --- datacompy/__init__.py | 2 +- datacompy/spark/sql.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/datacompy/__init__.py b/datacompy/__init__.py index e5865e71..6b02f0d8 100644 --- a/datacompy/__init__.py +++ b/datacompy/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.13.1" +__version__ = "0.13.2" import platform from warnings import warn diff --git a/datacompy/spark/sql.py b/datacompy/spark/sql.py index 21dd286d..1152a61e 100644 --- a/datacompy/spark/sql.py +++ b/datacompy/spark/sql.py @@ -48,8 +48,6 @@ upper, when, ) - from pyspark.version import __version__ - except ImportError: pass # Let non-Spark people at least enjoy the loveliness of the spark sql datacompy functionality @@ -210,7 +208,7 @@ def _validate_dataframe( """ dataframe = getattr(self, index) - if __version__ >= "3.4.0": + if self.spark_session.version >= "3.4.0": import pyspark.sql.connect.dataframe instances = (pyspark.sql.DataFrame, pyspark.sql.connect.dataframe.DataFrame)