awslabs / awslabs/python-deequ
satisfies test fails if assertion is not provided
- Lingua principale
- Jupyter Notebook
- Stelle
- 826
- Fork
- 158
- Merge medio
- 9g 22h
- PR unite (30g)
- 3
Descrizione
**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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal percorso Python Check.satisfies intorno alle righe 542-544 e riproduci l’esempio con Spark 3.3 e pydeequ 1.1.1. Verifica come viene selezionato il metodo degli argomenti predefiniti della JVM e verifica la chiamata corretta con un test in cui assertion_func viene omesso. Il lavoro è completato quando la verifica viene eseguita senza l’errore Py4J di metodo non trovato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, scala, spark
- Ambito
- data-engineering
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 62/100