dtenedor commented on code in PR #48894:
URL: https://github.com/apache/spark/pull/48894#discussion_r1848999325
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala:
##########
@@ -47,6 +47,34 @@ import org.apache.spark.util.ArrayImplicits._
* Replaces [[UnresolvedRelation]]s if the plan is for direct query on files.
*/
class ResolveSQLOnFile(sparkSession: SparkSession) extends Rule[LogicalPlan] {
+ object UnresolvedRelationResolution {
Review Comment:
I think you have to put this object outside of the class if you want any
other code to be able to use it? Playing around with the Scala REPL, I am not
able to refer to the nested object without creating an instance of the class.
```
Welcome to the Ammonite Repl 3.0.0-M2 (Scala 3.3.3 Java 17.0.12)
@ class c() {
object d {
val x = 42
}
}
defined class c
@ val e = new c()
e: c = ammonite.$sess.cmd0$c@7a48e6e2
@ e.d
res2: _root_.ammonite.$sess.cmd1.e.d.type = ammonite.$sess.cmd0$c$d$@9d2723e
@ e.d.x
res3: Int = 42
@ c.d.x
-- [E008] Not Found Error: cmd4.sc:1:13
----------------------------------------
1 |val res4 = c.d.x
| ^^^
|value d is not a member of object ammonite.$sess.cmd0.c, but could be
made available as an extension method.
|
|The following import might make progress towards fixing the problem:
|
| import sourcecode.Text.generate
|
Compilation Failed
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]