You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael J. Carey (JIRA)" <ji...@apache.org> on 2019/03/29 16:44:00 UTC

[jira] [Created] (ASTERIXDB-2535) UPSERT and UUIDs are broken if used together

Michael J. Carey created ASTERIXDB-2535:
-------------------------------------------

             Summary: UPSERT and UUIDs are broken if used together
                 Key: ASTERIXDB-2535
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2535
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: COMP - Compiler, SQL - Translator SQL++
    Affects Versions: 0.9.4, 0.9.5
            Reporter: Michael J. Carey
             Fix For: 0.9.5


UPSERT doesn't work right for datasets with auto-generated (UUID) keys.  Both UPSERT and INSERT blindly generate and add the key - and if the incoming record already has a key value, they fail with an object-merge error (note that we need to improve the msg too!) due to what then becomes a duplicate field.  What's needed is to get them both to do to the right thing - which would be to use the incoming key value if there is one and only generate one only if there isn't one in the incoming object. This is especially a problem for UPSERTs, as it means we currently cannot ever update data in datasets with system-generated keys (!!!).  (For INSERT we could just make a rule that you can't pass in a key if you're going into auto-keyed dataset.)  This is a major bummer for open-source users who want to use UUIDs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)