S02042

Error Code

S02042

Error Message

Distributed queries do not support the 'exists' keyword. RefId:S02042

Probable Causes

Using the EXISTS keyword is not allowed in a distributed query.

For example,

dbName = "dfs://test"
if (existsDatabase(dbName)) {
	dropDatabase(dbName)
}
t = table(2023.01.01..2023.01.03 as tradeDate)
db = database(dbName, VALUE, 2023.01.01..2023.01.03)
pt = db.createPartitionedTable(t, `pt, `tradeDate)
pt.append!(t)

select * from pt where exists(select * from t where t.tradeDate=pt.tradeDate)

Solutions

Check whether the EXISTS keyword is used in a distributed query.