-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Enhancement] (nereids)implement showCreateTableCommand in nereids #43137
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: 41366 ms
|
TPC-DS: Total hot run time: 196696 ms
|
ClickBench: Total hot run time: 32.35 s
|
} | ||
|
||
@Override | ||
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { |
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.
ShowCreateTableStmt's analyze method needs to be re-implemented in nereids. For example, add a private void validate(ConnectContext ctx) throws UserException
method to do the job, and call it at the beginning of run method.
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.
Done - please review
84e8c15
to
4f8cbc3
Compare
public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception { | ||
validate(ctx); | ||
// If dbName is not provided, use the default database from the context | ||
String effectiveDbName = (tblNameInfo.getDb() == null || tblNameInfo.getDb().isEmpty()) |
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.
please refer to handleShowCreateTable() in ShowExecutor.java. The old code just needs some minor changes, it's easier to reivew. thanks.
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.
done - please review
4f8cbc3
to
6ff2719
Compare
|
||
// Fetch the catalog, database, and table metadata | ||
Env env = Env.getCurrentEnv(); | ||
DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(effectiveCatalog) |
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.
DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(effectiveCatalog) | |
DatabaseIf db = env.getCatalogMgr().getCatalogOrAnalysisException(tblNameInfo.getCtl()) | |
.getDbOrMetaException(tblNameInfo.getDb()); |
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.
done - pls review
public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception { | ||
validate(ctx); | ||
// If dbName is not provided, use the default database from the context | ||
String effectiveDbName = (tblNameInfo.getDb() == null || tblNameInfo.getDb().isEmpty()) |
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.
String effectiveDbName = (tblNameInfo.getDb() == null || tblNameInfo.getDb().isEmpty()) |
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.
done - pls review
? ctx.getDatabase() : tblNameInfo.getDb(); | ||
|
||
// If catalog is not provided, use the default catalog (e.g., internal) | ||
String effectiveCatalog = (tblNameInfo.getCtl() == null || tblNameInfo.getCtl().isEmpty()) |
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.
String effectiveCatalog = (tblNameInfo.getCtl() == null || tblNameInfo.getCtl().isEmpty()) |
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.
done
6ff2719
to
06c8ceb
Compare
run buildall |
pls resolve conflicts and regression cases fail |
06c8ceb
to
df61de2
Compare
run buildall |
df61de2
to
9213e5e
Compare
run buildall |
1 similar comment
run buildall |
TPC-H: Total hot run time: 45237 ms
|
run performance |
run p0 |
TPC-H: Total hot run time: 44763 ms
|
run buildall |
TPC-H: Total hot run time: 45402 ms
|
ClickBench: Total hot run time: 32.94 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Issue Number: close #42736
implement showCreateTableCommand in nereids
Changed Session Variables:
2024-11-18 11:17:06.052 INFO [suite-thread-1] (Suite.groovy:387) - Execute sql: DROP TABLE IF EXISTS
tb_show_create_table
2024-11-18 11:17:06.070 INFO [suite-thread-1] (ScriptContext.groovy:120) - Run test_show_create_table_nereids in /root/doris/doris/regression-test/suites/nereids_p0/show/test_show_create_table_nereids.groovy succeed
2024-11-18 11:17:25.342 INFO [main] (RegressionTest.groovy:281) - Start to run single scripts
2024-11-18 11:18:43.673 INFO [main] (RegressionTest.groovy:410) - Success suites:
/root/doris/doris/regression-test/suites/nereids_p0/show/test_show_create_table_nereids.groovy: group=query,arrow_flight_sql,p0, name=test_show_create_table_nereids
2024-11-18 11:18:43.691 INFO [main] (RegressionTest.groovy:492) - All suites success.