Ultimate access to all questions.
Given a table Carts
with schema (id LONG, items ARRAY<STRUCT<id: LONG, count: INT>>, email STRING)
containing the following data:
1001 | [{"id": "DESK65", "count": 1}] | "u1@domain.com"
1002 | [{"id": "KYBD45", "count": 1}, {"id": "M27", "count": 2}] | "u2@domain.com"
1003 | [{"id": "M27", "count": 1}] | "u3@domain.com"
The following MERGE statement with schema evolution enabled is executed:
MERGE INTO carts c
USING updates u
ON c.id = u.id
WHEN MATCHED
THEN UPDATE SET *
How would this update be processed when applying the following record from the updates view that contains:
coupon
) in the items arrayemail
)id: 1001
items: [{"id": "DESK65", "count": 2, "coupon": "BOG050"}]