Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Decimal types Apache Drill

avatar
Master Collaborator

Hi:

I saw in apache drill that decimal is disabled, so, I activated from the command line:

0: jdbc:drill:> ALTER SYSTEM SET `planner.enable_decimal_data_type` = true;
+-------+--------------------------------------------+
|  ok   |                  summary                   |
+-------+--------------------------------------------+
| true  | planner.enable_decimal_data_type updated.  |
+-------+--------------------------------------------+
1 row selected (0.093 seconds)

and the query was done correctly

 encantos            | 1    | 2016-04-02  | DVI82OOU  | 3023       | 32.00    |
| banzhinan           | 1    | 2016-04-02  | DVI82OOU  | 3023       | 0.10     |
| labogran            | 1    | 2016-04-02  | DVI82OOU  | 3023       | 50.00    |
| nortegra            | 15   | 2016-04-02  | DVI82OOU  | 3023       | 483.40   |
+---------------------+------+-------------+-----------+------------+----------+


but from Rstudio and R, Doesnt work and iam receiving this error:

oadd.org.apache.drill.exec.vector.accessor.InvalidAccessException: Requesting value of type long for an object of type DECIMAL9:OPTIONAL is not allowed.

SO, I need to activate somenthing from R also???

Thanks

1 ACCEPTED SOLUTION

avatar
Master Collaborator

Hi:

I change my decimal(9,2) in hive to Double, and now its working

View solution in original post

2 REPLIES 2

avatar
Super Guru

you have set the planner.enable_decimal_data_type at system level so there is no need to activate it from R,Drill wont support decimal type fully, currently decimal support is in alpha feature and not meant for the production.will be good if you update the jira(https://issues.apache.org/jira/browse/DRILL-4184) with complete stacktrace.

avatar
Master Collaborator

Hi:

I change my decimal(9,2) in hive to Double, and now its working