You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run sbt stryker, compilation fails due to it tries to mutate either >= or <= operation to ==.
The correct syntax of Spark's condition for equal method is ===.
It will throw below error when you run sbt stryker.
[error] /Users/stryker-spark-example/target/stryker4s-572897741400037258/src/main/scala/SimpleDFHelper.scala:27:32: value or is not a member of Boolean
[error] df.where($"col1" == 10 or col("col2") <= "B")
[error] ^
[error] /Users/stryker-spark-example/target/stryker4s-572897741400037258/src/main/scala/SimpleDFHelper.scala:35:47: type mismatch;
[error] found : Boolean
[error] required: org.apache.spark.sql.Column
[error] df.where($"col1" >= 10 or col("col2") == "B")
[error] ^
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
Stryker4s config
stryker4s {
mutate: [ "src/main/scala/*.scala"]
}
Stryker4s environment
stryker4s 0.14.0
Your Environment
software
version(s)
Scala version
2.13.6
Spark version
3.2.0
Build tool & version
1.3.13
Operating System
macOS Big Sur
Note that the issue occurs on Scala 2.12.x and Spark 2.4.x as well.
The text was updated successfully, but these errors were encountered:
Hi, does Stryker4s still continue? Since 0.14.0 Stryker4s is able to deal with compile errors and mark them in the report. We don't have enough type information to know Spark uses ===, but it should still be able to continue
@monoti I don't think that will happen anytime in the near future. Otherwise if we ever do type analysis for every mutant we'd have to check a possible mutation to both == and === which, in Scala, can come from a lot of different places.
The mutant is marked as a compile error, but I think the sbt plugin should have better output so it doesn't show this as an error (it's not, it's just part of the process of removing non-compiling mutants)
hugo-vrijswijk
changed the title
Spark: Mutation does not support for Spark filter syntax
Improve compile-error feedback messages
Jan 3, 2022
Summary
When I run
sbt stryker
, compilation fails due to it tries to mutate either>=
or<=
operation to==
.The correct syntax of Spark's condition for equal method is
===
.I have prepared a repo to reproduce the issue: stryker-spark-example.
It will throw below error when you run
sbt stryker
.Stryker4s config
Stryker4s environment
Your Environment
Note that the issue occurs on Scala 2.12.x and Spark 2.4.x as well.
The text was updated successfully, but these errors were encountered: