Github user DeepSparkBot commented on a diff in the pull request:
https://github.com/apache/spark/pull/12061#discussion_r58147400
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala
---
@@ -214,6 +216,14 @@ case class NewInstance(
override def children: Seq[Expression] = arguments
+ override lazy val resolved: Boolean = childrenResolved && !{
+ // If the class to construct is an inner class, we need to get its
outer pointer, or this
+ // expression should be regarded as unresolved.
+ // Note that static inner classes (e.g., inner classes within Scala
objects) don't need
+ // outer pointer registration.
+ outerPointer.isEmpty && cls.isMemberClass &&
!Modifier.isStatic(cls.getModifiers)
+ }
--- End diff --
Detected style violation.
Suggested improvement:
```
override lazy val resolved: Boolean = {
// If the class to construct is an inner class, we need to get its outer
pointer, or this
// expression should be regarded as unresolved.
// Note that static inner classes (e.g., inner classes within Scala
objects) don't need
// outer pointer registration.
val innerStaticClass = outerPointer.isEmpty && cls.isMemberClass &&
!Modifier.isStatic(cls.getModifiers)
childrenResolved && !innerStaticClass
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]