You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Devender Yadav <de...@gmail.com> on 2016/01/07 10:25:55 UTC

DATA_READ ERROR in hive+oracle join query in apache drill

Hi,


I have a table "catalog_sales" in hive & "customer_address" on oracle.

Data types for these fields in Drill (*I checked using describe table*):

"customer_address"

address_id    :  Decimal
city          :  CHARACTER VARYING

"catalog_sales"


bill_addr_id  :  Double
net_profit    :  Double.....


I tried a join query in hive & oracle:

select x.net_profit, y.city from hive.testdb.`catalog_sales` x

inner join oracle.USER.`customer_address` y

on y.address_id = x.bill_add_id

Above query worked & I got desired output.

Then I tried:

select y.city, sum(x.net_profit) from hive.testdb.`catalog_sales` x

 inner join oracle.USER.`customer_address` y

on y.address_id = x.bill_addr_id group by y.city


I got follwing Exception:

*Error: DATA_READ ERROR: The JDBC storage plugin failed while trying
setup the SQL query.*

sql SELECT "CA_CITY", CAST("ADDRESS_ID" AS DOUBLE) "$f13" FROM
"USER"."CUSTOMER_ADDRESS" plugin oracle Fragment 0:0

[Error Id: 7a2106da-1326-4de1-81e4-338a37acd7f9 on
192.168.145.151:31010] (state=,code=0)

Since joined columns(address_id,bill_addr_id) has different datatypes
ie Decimal & Double but these are similar. So, I think this should be
handled.

*NOTE:* I enable decimal type using:
ALTER SYSTEM SET `planner.enable_decimal_data_type` = true;


Regards,
Devender