allisonwang-db commented on a change in pull request #31316:
URL: https://github.com/apache/spark/pull/31316#discussion_r575757699



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -144,10 +143,14 @@ case class UnresolvedAttribute(nameParts: Seq[String]) 
extends Attribute with Un
   def name: String =
     nameParts.map(n => if (n.contains(".")) s"`$n`" else n).mkString(".")
 
-  override def exprId: ExprId = throw new UnresolvedException("exprId")
-  override def dataType: DataType = throw new UnresolvedException("dataType")
-  override def nullable: Boolean = throw new UnresolvedException("nullable")
-  override def qualifier: Seq[String] = throw new 
UnresolvedException("qualifier")
+  override def exprId: ExprId =
+    throw 
QueryCompilationErrors.invalidCallFunctionOnUnresolvedObjectError("exprId")

Review comment:
       Instead of using `QueryCompilationErrors.` multiple times, we can 
simplify this by importing `QueryCompilationErrors. 
invalidCallFunctionOnUnresolvedObjectError`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to