-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Enhancement] doris to support function SESSION_USER() #39575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
TPC-H: Total hot run time: 37938 ms |
|
run buildall |
xinyiZzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
can improve comment, link to the MySQL function docs. |
|
run buildall |
2 similar comments
|
run buildall |
|
run buildall |
doc update for[ #39575](apache/doris#39575)
| * ScalarFunction 'SessionUser'. | ||
| */ | ||
| public class SessionUser extends ScalarFunction | ||
| implements LeafExpression, ExplicitlyCastableSignature, AlwaysNotNullable, Nondeterministic { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nondeterministic trait be removed in PR #39944. u should override isDeterministic and let it return false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
0e80567 to
968b761
Compare
|
run buildall |
TPC-H: Total hot run time: 38502 ms |
TPC-DS: Total hot run time: 188474 ms |
ClickBench: Total hot run time: 31.98 s |
|
run p0 |
Nitin-Kashyap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
xinyiZzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
doc update for[ #39575](apache/doris#39575)
doc update for[ #39575](apache/doris#39575)
## Proposed changes Issue Number: close #39574 Added support for new scalar function session_user() when run sqlmap tool on Doris master it gave error like session_user() function not found. mysql support this function. https://www.w3schools.com/sql/func_mysql_session_user.asp Its similar to Doris user() function. mysql> select SESSION_USER(); +--------------------+ | session_user() | +--------------------+ | 'root'@'127.0.0.1' | +--------------------+ 1 row in set (0.01 sec) mysql> select session_user(); +--------------------+ | session_user() | +--------------------+ | 'root'@'127.0.0.1' | +--------------------+ 1 row in set (0.00 sec) mysql>
Proposed changes
Issue Number: close #39574
Added support for new scalar function session_user()
when run sqlmap tool on Doris master it gave error like session_user() function not found. mysql support this function.
https://www.w3schools.com/sql/func_mysql_session_user.asp
Its similar to Doris user() function.
mysql> select SESSION_USER();
+--------------------+
| session_user() |
+--------------------+
| 'root'@'127.0.0.1' |
+--------------------+
1 row in set (0.01 sec)
mysql> select session_user();
+--------------------+
| session_user() |
+--------------------+
| 'root'@'127.0.0.1' |
+--------------------+
1 row in set (0.00 sec)
mysql>