-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Feature](PreparedStatement) implement general server side prepared #33807
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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.
clang-tidy made some suggestions
be/src/olap/column_tree.h
Outdated
class GolobalColumnTree { | ||
public: | ||
GolobalColumnTree() = default; | ||
void register_column(const vectorized::PathInData& path, const RowsetId& rowset_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.
warning: method 'register_column' can be made static [readability-convert-member-functions-to-static]
void register_column(const vectorized::PathInData& path, const RowsetId& rowset_id, | |
static void register_column(const vectorized::PathInData& path, const RowsetId& rowset_id, |
be/src/olap/column_tree.h
Outdated
std::lock_guard<std::mutex> lock(_lock); | ||
} | ||
// return nullptr if not found | ||
const SubcolumnReader* get_reader(const vectorized::PathInData& path, RowsetId rowset_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.
warning: method 'get_reader' can be made static [readability-convert-member-functions-to-static]
const SubcolumnReader* get_reader(const vectorized::PathInData& path, RowsetId rowset_id, | |
static const SubcolumnReader* get_reader(const vectorized::PathInData& path, RowsetId rowset_id, |
87afb69
to
b9ca2b0
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41856 ms
|
TPC-DS: Total hot run time: 185847 ms
|
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. |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TPC-DS: Total hot run time: 188249 ms
|
TeamCity be ut coverage result: |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 186550 ms
|
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 40720 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 185317 ms
|
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. |
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
Description:
This commit marks the initial step towards integrating a server-side prepared statement feature into the original planner, set to be implemented in Nereids soon.
Background:
Previously, we added support for prepared statements for point query and insert statements in #15491, aimed at enhancing front-end performance by introducing basic server-side prepared statement functionality. However, certain scenarios necessitate server-side prepared statements to ensure compatibility with Business Intelligence (BI) tools.
Details:
This pull request introduces a general prepared statement mechanism for all query types, including point queries. The implementation aligns with the MySQL protocol's server-side prepared statement workflow, which involves two phases:
The first phase involves sending the PREPARE command to Doris, wherein statements with placeholders (e.g., SELECT * FROM tbl WHERE k = ?) are analyzed and cached.
Subsequently, the EXECUTE command is sent to Doris, utilizing the statement ID to retrieve the previously cached statement.
Types of Prepared Statements:
This implementation supports three types of prepared statements:
This enhancement aims to improve query performance and compatibility with BI tools by leveraging server-side prepared statements across various query types.
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...