Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2535

UPSERT and UUIDs are broken if used together

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              HussainHT Hussain Towaileb
              Reporter:
              dtabass Michael J. Carey
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: