-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix] fix the cascadesContext.getMemo()==null #48771
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 32612 ms
|
@@ -271,8 +271,12 @@ private Plan planWithoutLock( | |||
// print memo before choose plan. | |||
// if chooseNthPlan failed, we could get memo to debug | |||
if (cascadesContext.getConnectContext().getSessionVariable().dumpNereidsMemo) { | |||
String memo = cascadesContext.getMemo().toString(); | |||
LOG.info("{}\n{}", ConnectContext.get().getQueryIdentifier(), memo); | |||
Memo memo = cascadesContext.getMemo(); |
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.
why memo could be null? could u add a case?
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.
when I set the SessionVariable().dumpNereidsMemo
is true, and I run the case:
create table mytable
(
id int,
name string
)
COMMENT "my first table"
DISTRIBUTED BY HASH(id) BUCKETS 1
PROPERTIES (
"replication_num" = "1"
);
insert into mytable values(1, 'hello');
the INSERT sql will occur the error.
TPC-DS: Total hot run time: 185327 ms
|
ClickBench: Total hot run time: 31.29 s
|
What problem does this PR solve?
fix the cascadesContext.getMemo() == null, the error:
Cannot invoke "org.apache.doris.nereids.memo.Memo.toString()" because the return value of "org.apache.doris.nereids.CascadesContext.getMemo()" is null
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)