tidyverse / dbplyr

Database (DBI) backend for dplyr
https://dbplyr.tidyverse.org
Other
469 stars 169 forks source link

Snowflake Numerical Values Converted to Character #1507

Open udostrasser opened 1 month ago

udostrasser commented 1 month ago

In the example below, the SQL and aggregation works properly, but the resulting data frame would have a total column of type character. This occurs with all numerical columns created using mutate or summarize before collect(). It does not occur with numerical columns selected directly from the table with no other manipulation.

I am currently using R 4.4.0 and dplyr 1.1.4 on an M3 mac.

tblSnowflake %>% 
  group_by(CHARACTER_COLUMN) %>% 
  summarize(total = sum(NUMERIC_COLUMN)) %>% 
  collect() 
image