cloud-fan commented on code in PR #55647:
URL: https://github.com/apache/spark/pull/55647#discussion_r3178376580


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveFetchCursor.scala:
##########
@@ -64,7 +64,8 @@ class ResolveFetchCursor(val catalogManager: CatalogManager) 
extends Rule[Logica
           nameParts = u.nameParts
         ) match {
           case Some(variable) => variable.copy(canFold = false)
-          case _ => throw unresolvedVariableError(u.nameParts, Seq("SYSTEM", 
"SESSION"))
+          case _ => throw unresolvedVariableError(
+            u.nameParts, variableResolution.searchPathEntriesForError, 
u.origin)

Review Comment:
   Fix is correct and mirrors `ResolveSetVariable`. Late catch from my side: 
worth adding a symmetric regression test under a non-default PATH (alongside 
the existing `SET VAR` coverage in `SetPathSuite` line 388, or in 
`SqlScriptingCursorE2eSuite`) so the bracketed-list rendering is locked in for 
`FETCH ... INTO` — the bonus item lists this code path explicitly. Not blocking.



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

Reply via email to