Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-891

Multi-tenant - Upserting values without specifying columns names upserts values in wrong columns

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 4.0.0
    • Fix Version/s: 3.0.0, 4.0.0
    • Labels:
      None

      Description

      Base table:
      CREATE TABLE base.mt (tenant_id VARCHAR not null, event_type VARCHAR not null, mycol varchar CONSTRAINT pk PRIMARY KEY(tenant_id,event_type)) MULTI_TENANT=true;

      Tenant specific table:
      CREATE VIEW acme.mt AS SELECT * FROM base.mt;

      Upsert statement:
      upsert into acme.mt values ('foo','bar')

      Result:
      Values are upserted in wrong columns:
      tenant_id: foo, event_id: bar, mycol: acme

        Attachments

          Activity

            People

            • Assignee:
              jamestaylor James R. Taylor
              Reporter:
              mujtabachohan Mujtaba Chohan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: