Red Hat Bugzilla – Bug 1252333
HBase translator - UPDATE statement requires primary key
Last modified: 2016-08-24 07:45:08 EDT
The HBase translator requires table to have a primary key defined. Is the PK really needed? If the table has no PK defined, then all columns are PK. E.g. query UPDATE hbase.SmallA SET StringNum = '555' WHERE hbase.SmallA.StringNum IS NULL is translated as UPSERT INTO smalla (stringnum, intkey) SELECT '555', smalla.intkey FROM smalla WHERE smalla.stringnum IS NULL (intkey is PK). Teiid can simply add all columns (except those defined in 'SET').
Yes, I know that HBase requires the PK to be defined, but what happen if a user decide to change PK in VDB ? It could be a problem whether PK is in VDB defined or not.
I suggest to add a hbase-translator-specific execution property which define PK in the source table and remove AssertionError .
HBase table: create table mytable(id integer primary key, nickname varchar(1))
Teiid table: create table mytable(id integer, username varchar(1) primary key)
Both, id and username, are valid PK (artificial/natural).
Steven Hawkins <email@example.com> updated the status of jira TEIID-3621 to Resolved
This issue should be resolved when BZ: 1252307 is fixed.
Why does this bug depends on 1252307? TEIID-3619 (1252307) is matter of Phoenix architecture. This bug is a regular bug in the Teiid.
Furthermore, the property "phoenix.connection.autoCommit" will neither resolve this issue nor help in fixing.
I'll restate. The Update related fixes (update,insert,delete) are being targeted for for the 8.12. And since this is tech preview, it was agreed that these didn't need to be back ported.
Steven Hawkins <firstname.lastname@example.org> updated the status of jira TEIID-3621 to Closed
Teiid does not throw AssertionError anymore. Instead Phoenix exception is thrown which is more appropriate and expected .
Project documentation has been updated. I have logged BZ1346808 to add warning also into product documentation.
Caused by: java.sql.SQLException: ERROR 218 (22018): Constraint violatioin. SMALLA.INTKEY may not be null