[Enhancement] doris to support function SESSION_USER()#39575
Merged
yiguolei merged 1 commit intoapache:masterfrom Sep 10, 2024
Merged
[Enhancement] doris to support function SESSION_USER()#39575yiguolei merged 1 commit intoapache:masterfrom
yiguolei merged 1 commit intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 37938 ms |
Contributor
Author
|
run buildall |
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
can improve comment, link to the MySQL function docs. |
morrySnow
previously approved these changes
Aug 28, 2024
924060929
previously approved these changes
Aug 28, 2024
Contributor
|
run buildall |
2 similar comments
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
xinyiZzz
pushed a commit
to apache/doris-website
that referenced
this pull request
Aug 28, 2024
doc update for[ #39575](apache/doris#39575)
morrySnow
reviewed
Aug 28, 2024
| * ScalarFunction 'SessionUser'. | ||
| */ | ||
| public class SessionUser extends ScalarFunction | ||
| implements LeafExpression, ExplicitlyCastableSignature, AlwaysNotNullable, Nondeterministic { |
Contributor
There was a problem hiding this comment.
Nondeterministic trait be removed in PR #39944. u should override isDeterministic and let it return false
0e80567 to
968b761
Compare
Contributor
Author
|
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 |
Contributor
|
run p0 |
Contributor
|
PR approved by at least one committer and no changes requested. |
hechao-ustc
pushed a commit
to hechao-ustc/doris-website
that referenced
this pull request
Sep 3, 2024
doc update for[ #39575](apache/doris#39575)
yiguolei
approved these changes
Sep 10, 2024
Gabriel39
pushed a commit
to Gabriel39/doris-website
that referenced
this pull request
Sep 23, 2024
doc update for[ #39575](apache/doris#39575)
dataroaring
pushed a commit
that referenced
this pull request
Oct 9, 2024
## 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>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>