Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switching version check to spark session #321

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datacompy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions datacompy/spark/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
Loading