Я пытаюсь создать временное представление в Spark SQL, используя оператор с:
create temporary view cars as (
with models as (
select 'abc' as model
)
select model from models
)
Но эта ошибка выдается:
error in SQL statement: ParseException:
mismatched input 'with' expecting {'(', 'SELECT', 'FROM', 'DESC', 'VALUES', 'TABLE', 'INSERT', 'DESCRIBE', 'MAP', 'MERGE', 'UPDATE', 'REDUCE'}(line 2, pos 8)
== SQL ==
create temporary view cars as (
with models as (
--------^^^
select 'abc' as model
)
select model from models
)