Closed markushc closed 1 year ago
Thanks for reporting this. We will look into it.
To add some context to this, it looks like the isContainedIn
check is trying to escape single quotes in the allowed values list by replacing '
with ''
:
https://github.com/awslabs/deequ/blob/d8bfb9c71bdce712d64d861343a801a5c5a9562c/src/main/scala/com/amazon/deequ/checks/Check.scala#L1007
Although this works with standard SQL, it seems like a \
needs to be used in Spark SQL: https://spark.apache.org/docs/latest/sql-ref-literals.html#parameters.
Steps to reproduce:
Run unit test shown below.
Expected outcome: Unit test passes, because
'a'
is in the list of allowed values and'a'
is the value of the column being checked.Actual outcome: Unit test fails. It seems this could be related to the allowed values having quotes.
Deequ version: 2.0.3-spark-3.3
Java version: 11