https://delta.io logo
a

Anmol Jain

03/08/2023, 9:38 PM
Hi. Has anyone seen this error while creating a view over a complex struct type datasets:
Copy code
Cannot have map type columns in DataFrame which calls set operations
To reproduce:
Copy code
Select * from
(
SELECT struct('Spark', map(1,2)) as a
Union
SELECT struct('Spark', map(1,1)) as a
)
Please do share best practices on handling these cases
c

Christopher Grant

03/09/2023, 8:19 AM
try
UNION ALL
.
UNION
tries to take only the distinct rows, and you can't do a
distinct
on MapType columns, i guess
a

Anmol Jain

03/10/2023, 12:07 PM
Thank you so much. @Christopher Grant
4 Views