Hive Druid integration - Filter with RLIKE clause in aggregation query is not being executed in Duid

Hi,

I am running HDP 3.0 with Druid version 0.12.1. I have created a druid table for powering visualizations with Tableau. Aggregation queries are executed properly except for one. When I have a filter condition with RLIKE clause, the query is not being pushed to Druid

Query executed : SELECT druid_events.event AS event, SUM(druid_events.record_count) AS sum_record_count_ok FROM druid_test.druid_events druid_events WHERE (druid_events.account_id RLIKE CONCAT(’.’, ‘id0001’, '.’)) GROUP BY druid_events.event;

0: jdbc:hive2://**defa> SELECT druid_events.event AS event, SUM(druid_events.record_count) AS sum_record_count_ok FROM druid_test.druid_events druid_events WHERE (druid_events.account_id RLIKE CONCAT(’.’, ‘id0001’, '.’)) GROUP BY druid_events.event;

INFO : Compiling command(queryId=hive_20191110041106_7204576c-3807-479f-84ba-6065da13889c): SELECT druid_events.event AS event, SUM(druid_events.record_count) AS sum_record_count_ok FROM druid_test.druid_events druid_events WHERE (druid_events.account_id RLIKE CONCAT(’.’, ‘id0001’, '.’)) GROUP BY druid_events.event

INFO : Semantic Analysis Completed (retrial = false)

INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:event, type:string, comment:null), FieldSchema(name:sum_record_count_ok, type:bigint, comment:null)], properties:null)

INFO : Completed compiling command(queryId=hive_20191110041106_7204576c-3807-479f-84ba-6065da13889c); Time taken: 0.104 seconds

INFO : Executing command(queryId=hive_20191110041106_7204576c-3807-479f-84ba-6065da13889c): SELECT druid_events.event AS event, SUM(druid_events.record_count) AS sum_record_count_ok FROM druid_test.druid_events druid_events WHERE (druid_events.account_id RLIKE CONCAT(’.’, ‘id0001’, '.’)) GROUP BY druid_events.event

INFO : Query ID = hive_20191110041106_7204576c-3807-479f-84ba-6065da13889c

INFO : Total jobs = 1

INFO : Launching Job 1 out of 1

INFO : Starting task [Stage-1:MAPRED] in serial mode

INFO : Subscribed to counters: for queryId: hive_20191110041106_7204576c-3807-479f-84ba-6065da13889c

INFO : Session is already open

INFO : Dag name: SELECT druid_events…ruid_events.event` (Stage-1)

INFO : Status: Running (Executing on YARN cluster with App id application_1573124583869_0097)

Hi Manu,

Hive converts the SQL into druid native json queries. Im not that familiar with the intervals if Hive, however this is something that Hive developers could answer in detail. You can follow the open issues in Hive Druid integration link here

https://issues.apache.org/jira/browse/HIVE-22157?jql=project%20%3D%20HIVE%20AND%20component%20%3D%20%22Druid%20integration%22

Regards,

Muthu Lalapet.