You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "vitaliili-db (via GitHub)" <gi...@apache.org> on 2023/08/21 22:32:35 UTC
[GitHub] [spark] vitaliili-db commented on a diff in pull request #42549: [SPARK-44860][SQL] Add SESSION_USER function
vitaliili-db commented on code in PR #42549:
URL: https://github.com/apache/spark/pull/42549#discussion_r1300714079
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala:
##########
@@ -302,6 +302,24 @@ case class CurrentUser() extends LeafExpression with Unevaluable {
final override val nodePatterns: Seq[TreePattern] = Seq(CURRENT_LIKE)
}
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = """_FUNC_() - connected user name.""",
Review Comment:
converting to alias since session_user change is not relevent for non-external functions.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala:
##########
@@ -302,6 +302,24 @@ case class CurrentUser() extends LeafExpression with Unevaluable {
final override val nodePatterns: Seq[TreePattern] = Seq(CURRENT_LIKE)
}
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = """_FUNC_() - connected user name.""",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ mockingjay
+ """,
+ since = "3.5.0",
+ group = "misc_funcs")
+// scalastyle:on line.size.limit
+case class SessionUser() extends LeafExpression with Unevaluable {
Review Comment:
Done, thank you!
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org