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
daft_validation - AttributeError: module 'statistics' has no attribute 'correlation' #200
Comments
Thank you @maltzsama I think the quick fix, will be to push now |
@canimus , It will create in other validation, PySpark 3.2.X does not support python 3.10 as you can see on this table, so I think it's not the better way to solve this problem, Look:
Maintain this compatibility should be important to execute this lib on GCP DataProc when using images as 2.0.96-debian10. |
@canimus , I was looking for some information about versions of python in some environments. GCP works like I said in previous comment. But I had found out this:
So, I agree with you. Push now cuallee to a min version of 3.10 can be done with a min of side effects(I hope so) |
Hi @maltzsama after looking at the statistics here it seems that |
Describe the bug
When attempting to use the
correlation
function within a custom defined function decorated with@daft.udf
, an AttributeError is raised due to the absence of thecorrelation
attribute in thestatistics
module. This error occurs because thecorrelation
function was introduced in Python version 3.10. Nowadays the minor python version supported by cuallee is 3.8, where this error can be reproducedTo Reproduce
To reproduce the behavior:
correlation
function within a custom defined function decorated with@daft.udf
.cuallee/daft_validation.py:211: AttributeError
Expected behavior
The
correlation
function should be successfully called within the custom defined function decorated with@daft.udf
.Additional context
This bug arises due to the fact that the
correlation
function was introduced in Python version 3.10, and the environment where the code is being executed is likely using an older version of Python where this function does not exist.The text was updated successfully, but these errors were encountered: