kovjanos commented on PR #3214:
URL: https://github.com/apache/hive/pull/3214#issuecomment-1100758580

   That doesn't work with Oracle, even plain table has uniqueness issues - see 
below. Do we need to have this also on ORACLE?  I can add the column to keep 
schema consistent, but it can't be a PRIMARY KEY  (might not even be required 
for the DELETEs  in Oracle if it works differently).
   One solution might be the old-school solution: a sequence and trigger behind 
the increment column. I'll give it a try..
   
   ```
   CREATE TABLE TEST_TABLE (
     ID  number(19) NOT NULL,
     DB  varchar(10) NOT NULL,
     PKEY NUMBER(19) GENERATED ALWAYS AS IDENTITY 
   ) ROWDEPENDENCIES;
   INSERT ALL
     INTO TEST_TABLE (ID, DB) VALUES (1,'1-db')
     INTO TEST_TABLE (ID, DB) VALUES (2,'2-db')
     INTO TEST_TABLE (ID, DB) VALUES (3,'3-db')
   SELECT 1 FROM DUAL;
   SELECT * FROM TEST_TABLE;
   
     ID DB         PKEY
   ---- ---------- ----
      1 1-db          1
      2 2-db          1
      3 3-db          1
   ```
    


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to