awslabs / awslabs/python-deequ
satisfies test fails if assertion is not provided
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 826
- Forks
- 158
- Ø Merge
- 9 T. 22 Std.
- Gemergte PRs (30 T.)
- 3
Beschreibung
**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
Beitragsleitfaden
Rechercherichtung
Beginne beim Python Check.satisfies-Pfad um die Zeilen 542–544 und reproduziere das Beispiel mit Spark 3.3 und pydeequ 1.1.1. Untersuche, wie die JVM-Methode für Standardargumente ausgewählt wird, und überprüfe den korrigierten Aufruf anhand eines Tests, bei dem assertion_func weggelassen wird. Erledigt bedeutet, dass die Verifizierung ohne den Py4J-Fehler „Methode nicht gefunden“ ausgeführt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, scala, spark
- Bereich
- data-engineering
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 62/100