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

satisfies test fails if assertion is not provided #182

Open
poolis opened this issue Jan 2, 2024 · 1 comment
Open

satisfies test fails if assertion is not provided #182

poolis opened this issue Jan 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@poolis
Copy link
Contributor

poolis commented Jan 2, 2024

Describe the bug
satisfies test fails if assertion is not provided despite there being a default value for the argument.

I believe the reference satisfies$default$2 should be satisfies$default$3 but I need to test that.

To Reproduce

from pydeequ.checks import *
from pydeequ.verification import *

check = Check(spark, CheckLevel.Warning, "test satisfies")

checkResult = VerificationSuite(spark)
.onData(df)
.addCheck(
check
.satisfies("r in ('123','456','789')","r cannot contain any values excpet"))
.run()

Error:

py4j.Py4JException: Method satisfies$default$2([]) does not exist

--> 542 else getattr(self._Check, "satisfies$default$2")()
543 hint = self._jvm.scala.Option.apply(hint)
544 self._Check = self._Check.satisfies(columnCondition, constraintName, assertion_func, hint)

Expected behavior
Test runs without error

Additional context
Spark 3.3, pydeequ==1.1.1

@poolis
Copy link
Contributor Author

poolis commented Jan 2, 2024

I have verified that satisfies$default$3 resolves the issue, I will submit a PR.

@chenliu0831 chenliu0831 added the bug Something isn't working label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants