odbc
odbc copied to clipboard
Cannot drop tables in Cassandra 3.11.3
Issue Description and Expected Result
dbRemoveTable() when connected to Cassandra 3.11.3 returns the following error:
Error: <SQL> 'DROP TABLE "cars"'
nanodbc/nanodbc.cpp:1587: HY000: [RStudio][CassandraODBC] (10) Error while executing a query in Cassandra: [33562624] : line 1:11 no viable alternative at input '""' (DROP TABLE [""]...)
Running the following successfully drops the table:
dbSendStatement(con,
"DROP TABLE IF EXISTS cars;")
Database
Cassandra 3.11.3
Reproducible Example
library(DBI)
con <- dbConnect(odbc::odbc(), "Cassandra (DSN)", timeout = 10)
dbIsValid(con)
#> [1] TRUE
dbExistsTable(con, "cars")
#> [1] TRUE
dbRemoveTable(con, "cars")
#> Error: <SQL> 'DROP TABLE "cars"'
#> nanodbc/nanodbc.cpp:1587: HY000: [RStudio][CassandraODBC] (10) Error while executing a query in Cassandra: [33562624] : line 1:11 no viable alternative at input '""' (DROP TABLE [""]...)
Session Info
devtools::session_info()
#> Warning in system("timedatectl", intern = TRUE): running command
#> 'timedatectl' had status 1
#> Session info -------------------------------------------------------------
#> setting value
#> version R version 3.5.1 (2018-07-02)
#> system x86_64, linux-gnu
#> ui unknown
#> language (EN)
#> collate en_US.UTF-8
#> tz America/New_York
#> date 2018-10-10
#> Packages -----------------------------------------------------------------
#> package * version date source
#> backports 1.1.2 2017-12-13 RSPM (R 3.5.1)
#> base * 3.5.1 2018-08-17 local
#> bit 1.1-14 2018-05-29 RSPM (R 3.5.1)
#> bit64 0.9-7 2017-05-08 RSPM (R 3.5.1)
#> blob 1.1.1 2018-03-25 RSPM (R 3.5.1)
#> compiler 3.5.1 2018-08-17 local
#> datasets * 3.5.1 2018-08-17 local
#> DBI * 1.0.0 2018-05-02 RSPM (R 3.5.1)
#> devtools 1.13.6 2018-06-27 RSPM (R 3.5.1)
#> digest 0.6.16 2018-08-22 RSPM (R 3.5.1)
#> evaluate 0.11 2018-07-17 RSPM (R 3.5.1)
#> graphics * 3.5.1 2018-08-17 local
#> grDevices * 3.5.1 2018-08-17 local
#> hms 0.4.2 2018-03-10 RSPM (R 3.5.1)
#> htmltools 0.3.6 2017-04-28 RSPM (R 3.5.1)
#> knitr 1.20 2018-02-20 RSPM (R 3.5.1)
#> magrittr 1.5 2014-11-22 RSPM (R 3.5.1)
#> memoise 1.1.0 2017-04-21 RSPM (R 3.5.1)
#> methods * 3.5.1 2018-08-17 local
#> odbc 1.1.6 2018-06-09 RSPM (R 3.5.1)
#> pkgconfig 2.0.2 2018-08-16 RSPM (R 3.5.1)
#> Rcpp 0.12.18 2018-07-23 RSPM (R 3.5.1)
#> rlang 0.2.2 2018-08-16 RSPM (R 3.5.1)
#> rmarkdown 1.10 2018-06-11 RSPM (R 3.5.1)
#> rprojroot 1.3-2 2018-01-03 RSPM (R 3.5.1)
#> stats * 3.5.1 2018-08-17 local
#> stringi 1.2.4 2018-07-20 RSPM (R 3.5.1)
#> stringr 1.3.1 2018-05-10 RSPM (R 3.5.1)
#> tools 3.5.1 2018-08-17 local
#> utils * 3.5.1 2018-08-17 local
#> withr 2.1.2 2018-03-15 RSPM (R 3.5.1)
#> yaml 2.2.0 2018-07-25 RSPM (R 3.5.1)