S02030

Error Code

S02030

Error Message

Function toArray cannot be used with PIVOT BY. RefId:S02030

Probable Causes

The toArray function is not allowed to be used with PIOVT BY.

For example:

n = 10000
id = take(1..10, n)
value = take(1..10, n)
t = table(id, value)

select toArray(id) from t pivot by id, value // throw exception

Solutions

Avoid using toArray when querying with a PIVOT BY clause.