插入时出错:输入时没有可行的选择 'with'

Error while inserting into: no viable alternative at input 'with'

我遇到了错误

org.apache.spark.sql.catalyst.parser.ParseException: No viable alternative at input 'with' to insert in a table.

同时执行以下插入查询:

INSERT INTO users partition(date)
WITH existentes AS (SELECT COUNT(1) AS name FROM users WHERE date=20160303)

如有任何帮助,我将不胜感激。

尝试更改顺序:

WITH existentes AS (SELECT COUNT(1) AS name FROM users WHERE date=20160303)
INSERT INTO users partition(date)