dusantism-db commented on code in PR #49445:
URL: https://github.com/apache/spark/pull/49445#discussion_r1946860345
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -269,6 +269,94 @@ class SqlScriptingParserSuite extends SparkFunSuite with
SQLHelper {
assert(exception.origin.line.contains(3))
}
+ test("compound: forbidden label - system") {
Review Comment:
Regarding this issue, it makes sense to use to either forbid session and
system as local variable names, or precisely define the expected behavior. For
example, what should this return - the session variable `x`, or the field `x`
in local variable `session`. :
`DECLARE x = 0 -- declare session variable`
```
BEGIN
lbl: BEGIN
DECLARE session = named_struct('x', 1);
SELECT session.x;
END;
END
```
@cloud-fan to me it makes more sense to forbid system and session as
variable names. What is your opinion? cc @srielau
--
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]