-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[Enhancement] support last_query_id function #40739
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 |
@@ -322,6 +322,7 @@ KILL: 'KILL'; | |||
LABEL: 'LABEL'; | |||
LARGEINT: 'LARGEINT'; | |||
LAST: 'LAST'; | |||
LAST_QUERY_ID: 'LAST_QUERY_ID'; |
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.
i think we should not support use this function without parentheses, so add this to keyword list is not necessary
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.
Thanks. updated
@@ -879,6 +883,10 @@ public TUniqueId queryId() { | |||
return queryId; | |||
} | |||
|
|||
public TUniqueId getLastQuerId() { |
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.
public TUniqueId getLastQuerId() { | |
public TUniqueId getLastQueryId() { |
e9e36aa
to
2e74ecf
Compare
TPC-H: Total hot run time: 39733 ms
|
run buildall |
TPC-H: Total hot run time: 43610 ms
|
TPC-DS: Total hot run time: 195561 ms
|
ClickBench: Total hot run time: 31.11 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
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.
all changes this file are not necessary
2e74ecf
to
0e07775
Compare
run buildall |
TPC-H: Total hot run time: 42666 ms
|
TPC-DS: Total hot run time: 199576 ms
|
ClickBench: Total hot run time: 31.09 s
|
PR approved by at least one committer and no changes requested. |
support display previous query id. mysql> select LAST_QUERY_ID(); No connection. Trying to reconnect... Connection id: 0 Current database: *** NONE *** +-----------------+ | last_query_id() | +-----------------+ | Not Available | +-----------------+ 1 row in set (0.08 sec) mysql> select LAST_QUERY_ID(); +-----------------------------------+ | last_query_id() | +-----------------------------------+ | e133f2641e0a411c-b73f1f6c67bedcf9 | +-----------------------------------+ 1 row in set (0.01 sec)
Proposed changes
Issue Number: close #xxx
support display previous query id.
mysql> select LAST_QUERY_ID();
No connection. Trying to reconnect...
Connection id: 0
Current database: *** NONE ***
+-----------------+
| last_query_id() |
+-----------------+
| Not Available |
+-----------------+
1 row in set (0.08 sec)
mysql> select LAST_QUERY_ID();
+-----------------------------------+
| last_query_id() |
+-----------------------------------+
| e133f2641e0a411c-b73f1f6c67bedcf9 |
+-----------------------------------+
1 row in set (0.01 sec)
mysql>