Skip to content
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

Insert select Stmt keep the same semantics with mysql #1626

Closed
wangbo opened this issue Aug 12, 2019 · 0 comments
Closed

Insert select Stmt keep the same semantics with mysql #1626

wangbo opened this issue Aug 12, 2019 · 0 comments

Comments

@wangbo
Copy link
Contributor

wangbo commented Aug 12, 2019

Question
When doing Insert Select stmt in doris,if the select stmt returns epmty set, it will returns a error which content is "all partitions have no load data".
But when the same case won't happends in MySQL
It's neccessary to make doris keep the same semantics with mysql

Key point:how to know Select stmt returns empty set

  • When Insert Select stmt finish executing,all be fragment reports OK status to fe,the Coordinator.tabletCommitInfos is empty means Select stmt returns empty set
  • When Insert Select stmt finish executing,at least one fragment reports Error status to fe,then the whole stmt will return error,there is no need to check Coordinator.tabletCommitInfos

What to do when Select stmt return empty set

  • set status of ConnectContext to OK and return, before method Catalog.getCurrentGlobalTransactionMgr().commitAndPublishTransaction,this will skip checking Coordinator.tabletCommitInfos,and error won't happen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant