As a reproducible example:
sc <- sparklyr::spark_connect(master = "local")
mtcars_spark <- dplyr::copy_to(dest = sc, df = mtcars)
name <- c(name = "test")
qry <- dplyr::sql("select mpg from mtcars")
res <- sparklyr::sdf_sql(sc = sc, sql = qry)
out <- dplyr::compute(x = res, name = name)
# Error: org.apache.spark.sql.catalyst.parser.ParseException:
# mismatched input '`name`' expecting {'(', 'SELECT', 'FROM', 'WITH', 'VALUES', 'TABLE', 'INSERT', 'MAP', 'REDUCE'}(line 2, pos 10)
#
# == SQL ==
# CREATE TEMPORARY VIEW
# `test` AS `name` AS SELECT `mpg`
# ----------^^^
# FROM `sparklyr_tmp_5c748cbd_9398_4dff_8c4e_f46939c88eb8`
FWIW, this seems to have become an issue after we upgraded from dbplyr 1.4.2 to 2.1.0.
As a reproducible example:
FWIW, this seems to have become an issue after we upgraded from dbplyr 1.4.2 to 2.1.0.