Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Support INSERT command #395

Open
jtaylor-sfdc opened this issue Aug 29, 2013 · 2 comments
Open

Support INSERT command #395

jtaylor-sfdc opened this issue Aug 29, 2013 · 2 comments

Comments

@jtaylor-sfdc
Copy link
Contributor

This would be the same as UPSERT, but would first check to see if the row already exists and if so would throw an exception. Useful when existing SQL scripts need to be run without change and the performance penalty of doing the check for an existing row is acceptable.

@haitaoyao
Copy link
Contributor

@jtaylor-sfdc
So the INSERT operation should invalid auto commit, with the sql compile and executed, the connection should check the whether the data exists. If not ,just write the result into region server, right?
If batched, what if another connection execute the same INSERT ?
So there will be a big performance penalty with INSERT because there's no batch operation.

@jtaylor-sfdc
Copy link
Contributor Author

@haitaoyao - there are some inherent problems with supporting this without some underlying primitives from HBase. Transactions would be ideal, but there's likely a middle ground too. Ideally, we'd do a batch checkAndPut on each region. The problem is that we'd need to do it serially, for each region, as we should fail the entire INSERT if any of the rows already exist.

How about #23 or #22 depending on the scope of work in which you're interested?

Another one would be to implement an UPSERT SET command that mimics the UPDATE command?

Or another possibility would be to pursue the Pentaho Mondrian integration mentioned here. Following up on getting these issues sorted out and things working well together would be really valuable.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants