hannes / MonetDBLite

MonetDB reconfigured as a library
108 stars 10 forks source link

dbGetQuery(conn, 'select 1.0') unexpected result #105

Closed clente closed 7 years ago

clente commented 7 years ago

This simple query returns 10 instead of 1 as it would be expected. Not sure what I'm doing wrong.

This was the query I ran and it's output:

> dbGetQuery(conn, 'select 1.0')
  single_value
1           10

This is the session info:

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252  LC_CTYPE=Portuguese_Brazil.1252    LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C                       LC_TIME=Portuguese_Brazil.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] lubridate_1.6.0      DBI_0.5-1            dplyr_0.5.0          purrr_0.2.2          readr_1.0.0         
 [6] tidyr_0.6.0          tibble_1.2           ggplot2_2.1.0        tidyverse_1.0.0      MonetDBLite_0.3.1   
[11] RevoUtilsMath_10.0.0 RevoUtils_10.0.2     RevoMods_10.0.0      MicrosoftML_1.0.0    mrsdeploy_1.0       
[16] RevoScaleR_9.0.1     lattice_0.20-34      rpart_4.1-10        

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.7            CompatibilityAPI_1.1.0 magrittr_1.5           munsell_0.4.3          colorspace_1.2-7      
 [6] R6_2.2.0               foreach_1.4.3          stringr_1.1.0          plyr_1.8.4             tools_3.3.2           
[11] grid_3.3.2             gtable_0.2.0           iterators_1.0.8        lazyeval_0.2.0         digest_0.6.10         
[16] assertthat_0.1         mrupdate_1.0.0         codetools_0.2-15       curl_2.2               stringi_1.1.2         
[21] scales_0.4.0           jsonlite_1.1
PedroTadim commented 7 years ago

As I could see in MonetDBJavaLite (now in testing phase and this query works), the "select 1.0" query returns a Decimal type, which is not yet covered in MonetDBRLite.

hannes commented 7 years ago

Correct, this is something to be fixed. Duplicate of https://github.com/hannesmuehleisen/MonetDBLite/issues/15, closing here

hannes commented 7 years ago

Note: Workaround is cast to DOUBLE for example