KiranVelumuri commented on code in PR #5641:
URL: https://github.com/apache/hive/pull/5641#discussion_r2007408841


##########
standalone-metastore/metastore-server/src/main/sql/derby/hive-schema-4.1.0.derby.sql:
##########
@@ -679,14 +685,16 @@ CREATE TABLE WRITE_SET (
   WS_PARTITION varchar(767),
   WS_TXNID bigint NOT NULL,
   WS_COMMIT_ID bigint NOT NULL,
-  WS_OPERATION_TYPE char(1) NOT NULL
+  WS_OPERATION_TYPE char(1) NOT NULL,
+  INV_ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) 
PRIMARY KEY
 );
 
 CREATE TABLE TXN_TO_WRITE_ID (
   T2W_TXNID bigint NOT NULL,
   T2W_DATABASE varchar(128) NOT NULL,
   T2W_TABLE varchar(256) NOT NULL,
-  T2W_WRITEID bigint NOT NULL
+  T2W_WRITEID bigint NOT NULL,
+  CONSTRAINT TXN_TO_WRITE_ID_PK PRIMARY KEY (T2W_TXNID, T2W_DATABASE, 
T2W_TABLE)

Review Comment:
   In case of multi table insert, in the same transaction we update two or more 
tables. In such case to uniquely identify each row, I included DB and table as 
well in the primary key.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to