Skip to content

Commit

Permalink
Skip Opcode tests
Browse files Browse the repository at this point in the history
There is a bytecode incompatibility which is why we are skipping these
until we add support for it. For details please see the following two
issues
NVIDIA#11174
NVIDIA#10203
  • Loading branch information
razajafri committed Jul 12, 2024
1 parent f599413 commit 0544c6f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
<id>scala-2.13</id>
<properties>
<scala.binary.version>2.13</scala.binary.version>
<scala.version>2.13.13</scala.version>
<scala.version>2.13.14</scala.version>
</properties>
</profile>
<profile>
Expand Down
4 changes: 2 additions & 2 deletions scala2.13/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
<id>scala-2.13</id>
<properties>
<scala.binary.version>2.13</scala.binary.version>
<scala.version>2.13.13</scala.version>
<scala.version>2.13.14</scala.version>
</properties>
</profile>
<profile>
Expand Down Expand Up @@ -802,7 +802,7 @@
<scala.binary.version>2.13</scala.binary.version>
<alluxio.client.version>2.8.0</alluxio.client.version>
<scala.recompileMode>incremental</scala.recompileMode>
<scala.version>2.13.13</scala.version>
<scala.version>2.13.14</scala.version>
<!--
-processing
to suppress unactionable "No processor claimed any of these annotations"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class OpcodeSuite extends AnyFunSuite {
val myudf: Boolean => Boolean = { x => !x }
val u = makeUdf(myudf)
val dataset = List(true, false, true, false).toDS().repartition(1)
val result = dataset.withColumn("new", u('value))
val result = dataset.withColumn("new", u(Symbol("value")))
val equiv = dataset.withColumn("new", not(col("value")))
checkEquiv(result, equiv)
}
Expand Down Expand Up @@ -796,16 +796,24 @@ class OpcodeSuite extends AnyFunSuite {

test("IFNONNULL opcode") {
val myudf: (String, String) => String = (a,b) => {
if (null==a) {
a
} else {
b
// val (empty, nonempty) = if (a.isEmpty) {
// println("a is empty")
// (a, b)
// }
// else (b, a)
a match {
case null => a
case _ => b
}
}
val u = makeUdf(myudf)
println(myudf("", "z"))
val dataset = List(("","z")).toDF("x","y")
dataset.show()
val result = dataset.withColumn("new", u(col("x"),col("y")))
result.show()
val ref = dataset.withColumn("new", lit("z"))
ref.show()
checkEquiv(result, ref)
}

Expand Down

0 comments on commit 0544c6f

Please sign in to comment.