DyfanJones / RAthena

Connect R to Athena using Boto3 SDK (DBI Interface)
https://dyfanjones.github.io/RAthena/
Other
35 stars 6 forks source link

mutate(as.character) produces an error (unknown type) #45

Closed OssiLehtinen closed 4 years ago

OssiLehtinen commented 4 years ago

Issue Description

Similar to the earlier issue with as.integer https://github.com/DyfanJones/RAthena/issues/42, as.character also produces an error, as 'string' is an unknown type. Here we should use 'varchar'.

Reproducible Example

Example:

library(RAthena)
library(DBI)
con <- dbConnect(RAthena::athena(),
                 profile_name = "rathena")

tbl(con, "iris")) %>%
  mutate(sepal_length = as.character(sepal_length))

Error: SYNTAX_ERROR: line 1:8: Unknown type: string

Surely related again to the differences between HIVE DDL and Presto SQL Syntax.

DyfanJones commented 4 years ago

Thanks for point this out :) Apologies for this issue, I will fix this.

DyfanJones commented 4 years ago

This has now been fixed in latest dev version. Thanks for identifying bug 👍