This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new c1c1c9fa98f [SPARK-45305][SQL][TESTS] Remove JDK 8 workaround added
TreeNodeSuite
c1c1c9fa98f is described below
commit c1c1c9fa98f74fcc646214d39d2fec9dad6b5cc5
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Mon Sep 25 10:08:32 2023 -0700
[SPARK-45305][SQL][TESTS] Remove JDK 8 workaround added TreeNodeSuite
### What changes were proposed in this pull request?
In theory, we don't need https://github.com/apache/spark/pull/29875 anymore
because we dropped JDK 8 (according to the PR description in
https://github.com/apache/spark/pull/29875) but `Utils.getSimpleClass` handles
malformed class names in any event, so should be safe to keep them.
### Why are the changes needed?
To remove test that does not run. We dropped JDK 11/8 at SPARK-44112
### Does this PR introduce _any_ user-facing change?
No, test-only.
### How was this patch tested?
CI in this PR should test them out.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #43092 from HyukjinKwon/SPARK-45305.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../spark/sql/catalyst/trees/TreeNodeSuite.scala | 29 ----------------------
1 file changed, 29 deletions(-)
diff --git
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
index 3411415bbb6..c2f7287758d 100644
---
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
+++
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
@@ -864,35 +864,6 @@ class TreeNodeSuite extends SparkFunSuite with SQLHelper {
assert(getStateful(withNestedStatefulBefore) ne
getStateful(withNestedStatefulAfter))
}
- object MalformedClassObject extends Serializable {
- case class MalformedNameExpression(child: Expression) extends
TaggingExpression {
- override protected def withNewChildInternal(newChild: Expression):
Expression =
- copy(child = newChild)
- }
- }
-
- test("SPARK-32999: TreeNode.nodeName should not throw malformed class name
error") {
- val testTriggersExpectedError = try {
- classOf[MalformedClassObject.MalformedNameExpression].getSimpleName
- false
- } catch {
- case ex: java.lang.InternalError if ex.getMessage.contains("Malformed
class name") =>
- true
- case ex: Throwable => throw ex
- }
- // This test case only applies on older JDK versions (e.g. JDK8u), and
doesn't trigger the
- // issue on newer JDK versions (e.g. JDK11u).
- assume(testTriggersExpectedError, "the test case didn't trigger malformed
class name error")
-
- val expr = MalformedClassObject.MalformedNameExpression(Literal(1))
- try {
- expr.nodeName
- } catch {
- case ex: java.lang.InternalError if ex.getMessage.contains("Malformed
class name") =>
- fail("TreeNode.nodeName should not throw malformed class name error")
- }
- }
-
test("SPARK-37800: TreeNode.argString incorrectly formats arguments of type
Set[_]") {
case class Node(set: Set[String], nested: Seq[Set[Int]]) extends LeafNode {
val output: Seq[Attribute] = Nil
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]