Sql order by not working properly?

Hi all, we have the following sql queries, that we have recently encountered that appears to fail, (doing an explain yields the same error), I suspect this is an calcite/druid error.

sql order by ‘NUMBER’ query - failure (running on druid 0.16.0-incubating)

Hi all we have the following queries:

select message_id
from messages
where __time >= ‘2020-01-21 05:00:00.000’ and __time < ‘2020-01-21 06:00:00.000’
and company_id = ‘myco’
and country_code = ‘US’
and channel = ‘xyz’
THIS WORKS

select message_id
from messages
where __time >= ‘2020-01-21 05:00:00.000’ and __time < ‘2020-01-21 06:00:00.000’
and company_id = ‘myco’
and country_code = ‘US’
and channel = ‘xyz’
order by __time
THIS WORKS

select message_id
from messages
where __time >= ‘2020-01-21 05:00:00.000’ and __time < ‘2020-01-21 06:00:00.000’
and company_id = ‘myco’
and country_code = ‘US’
and channel = ‘xyz’
order by message_id
THIS FAILS

select message_id
from messages
where __time >= ‘2020-01-21 05:00:00.000’ and __time < ‘2020-01-21 06:00:00.000’
and company_id = ‘MY COMPANy’
and country_code = ‘US’
and channel = ‘xyz’
order by 1
THIS FAILS

Based on the order by docs: (https://druid.apache.org/docs/latest/querying/sql.html)

The ORDER BY clause refers to columns that are present after execution of GROUP BY. It can be used to order the results
based on either grouping expressions or aggregated values. ORDER BY can refer to an expression or a select clause
ordinal position (like ORDER BY 2 to order by the second selected column). For non-aggregation queries, ORDER BY
can only order by the __time column. For aggregation queries, ORDER BY can order by any column.

I would expect these queries to work, error details follow. (message_id is demension of type string)

Error info:
Error: Error -1 (00000) : Error while executing SQL “select message_id from messages where __time >= ‘2020-01-28 05:00:00.000’ and __time < ‘2020-01-29 06:00:00.000’ and company_id = ‘myco’ and country_code = ‘US’ and channel = ‘xyz’ order by 1”: Remote driver error: RuntimeException: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node [rel#72810:Subset#3.DRUID.[0]] could not be implemented; planner state:

Root: rel#72810:Subset#3.DRUID.[0]
Original rel:
LogicalSort(subset=[rel#72807:Subset#4.DRUID.[0]], sort0=[$0], dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 4.0 cpu, 0.0 io}, id = 72805
LogicalProject(subset=[rel#72804:Subset#3.NONE.], message_id=[$4]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 72803
LogicalFilter(subset=[rel#72802:Subset#2.NONE.], condition=[AND(>=($0, CAST(‘2020-01-28 05:00:00.000’):TIMESTAMP(3) NOT NULL), <($0, CAST(‘2020-01-29 06:00:00.000’):TIMESTAMP(3) NOT NULL), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))]): rowcount = 1.0, cumulative cost = {1.0 rows, 100.0 cpu, 0.0 io}, id = 72801
LogicalProject(subset=[rel#72800:Subset#1.NONE.], __time=[$0], channel=[$12], company_id=[$14], country_code=[$19], message_id=[$39]): rowcount = 100.0, cumulative cost = {100.0 rows, 500.0 cpu, 0.0 io}, id = 72799
LogicalTableScan(subset=[rel#72798:Subset#0.NONE.], table=[[druid, messages]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 72783

Sets:
Set#0, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72798:Subset#0.NONE., best=null, importance=0.5904900000000001
rel#72783:LogicalTableScan.NONE.(table=[druid, messages]), rowcount=100.0, cumulative cost={inf}
rel#72824:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72828:Subset#0.DRUID., best=rel#72827, importance=0.29524500000000004
rel#72827:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={1.0 rows, 0.0 cpu, 0.0 io}
Set#1, type: RecordType(TIMESTAMP(3) __time, VARCHAR channel, VARCHAR company_id, VARCHAR country_code, VARCHAR message_id)
rel#72800:Subset#1.NONE., best=null, importance=0.6561
rel#72799:LogicalProject.NONE., rowcount=100.0, cumulative cost={inf}
rel#72826:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72843:Subset#1.DRUID., best=rel#72842, importance=0.32805
rel#72842:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={1.005 rows, 0.0 cpu, 0.0 io}
Set#2, type: RecordType(TIMESTAMP(3) __time, VARCHAR channel, VARCHAR company_id, VARCHAR country_code, VARCHAR message_id)
rel#72802:Subset#2.NONE., best=null, importance=0.7290000000000001
rel#72801:LogicalFilter.NONE.(input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, CAST(‘2020-01-28 05:00:00.000’):TIMESTAMP(3) NOT NULL), <($0, CAST(‘2020-01-29 06:00:00.000’):TIMESTAMP(3) NOT NULL), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), importance=0.0, rowcount=1.0, cumulative cost={inf}
rel#72811:LogicalSort.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72815:LogicalFilter.NONE.[](input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72819:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72823:LogicalFilter.NONE.(input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72836:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72838:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72862:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72866:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72813:Subset#2.NONE.[4], best=null, importance=0.7290000000000001
rel#72811:LogicalSort.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72836:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72866:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72852:Subset#2.DRUID., best=rel#72851, importance=0.36450000000000005
rel#72851:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={0.10049999999999999 rows, 0.0 cpu, 0.0 io}
Set#3, type: RecordType(VARCHAR message_id)
rel#72804:Subset#3.NONE., best=null, importance=0.81
rel#72803:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72805:LogicalSort.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72814:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72820:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72833:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72837:DruidQueryRel.NONE., rowcount=1.0, cumulative cost={inf}
rel#72845:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72867:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72868:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72880:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72809:Subset#3.NONE.[0], best=null, importance=0.9
rel#72805:LogicalSort.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72814:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72833:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72845:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72867:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72880:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72810:Subset#3.DRUID.[0], best=null, importance=0.45
rel#72808:AbstractConverter.DRUID.0, rowcount=1.0, cumulative cost={inf}
rel#72850:Subset#3.DRUID., best=rel#72849, importance=0.45
rel#72808:AbstractConverter.DRUID.0, rowcount=1.0, cumulative cost={inf}
rel#72849:DruidQueryRel.DRUID., rowcount=1.0, cumulative cost={0.1001 rows, 0.0 cpu, 0.0 io}
Set#5, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72818:Subset#5.NONE., best=null, importance=0.6561
rel#72816:LogicalFilter.NONE.[](input=rel#72798:Subset#0.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($14, ‘myco’), =($19, ‘US’), =($12, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72825:DruidQueryRel.NONE.[](query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72830:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72832:Subset#5.NONE.[39], best=null, importance=0.6561
rel#72830:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72841:Subset#5.DRUID., best=rel#72840, importance=0.32805
rel#72840:DruidQueryRel.DRUID.[](query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={0.1 rows, 0.0 cpu, 0.0 io}
Set#6, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72861:Subset#6.NONE., best=null, importance=0.6561
rel#72859:LogicalFilter.NONE.(input=rel#72798:Subset#0.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($14, ‘myco’), =($19, ‘US’), =($12, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72863:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72869:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72865:Subset#6.NONE.[39], best=null, importance=0.6561
rel#72863:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72875:Subset#6.DRUID., best=rel#72874, importance=0.32805
rel#72874:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={0.1 rows, 0.0 cpu, 0.0 io}

-> CannotPlanException: Node [rel#72810:Subset#3.DRUID.[0]] could not be implemented; planner state:

Root: rel#72810:Subset#3.DRUID.[0]
Original rel:
LogicalSort(subset=[rel#72807:Subset#4.DRUID.[0]], sort0=[$0], dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 4.0 cpu, 0.0 io}, id = 72805
LogicalProject(subset=[rel#72804:Subset#3.NONE.], message_id=[$4]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 72803
LogicalFilter(subset=[rel#72802:Subset#2.NONE.], condition=[AND(>=($0, CAST(‘2020-01-28 05:00:00.000’):TIMESTAMP(3) NOT NULL), <($0, CAST(‘2020-01-29 06:00:00.000’):TIMESTAMP(3) NOT NULL), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))]): rowcount = 1.0, cumulative cost = {1.0 rows, 100.0 cpu, 0.0 io}, id = 72801
LogicalProject(subset=[rel#72800:Subset#1.NONE.], __time=[$0], channel=[$12], company_id=[$14], country_code=[$19], message_id=[$39]): rowcount = 100.0, cumulative cost = {100.0 rows, 500.0 cpu, 0.0 io}, id = 72799
LogicalTableScan(subset=[rel#72798:Subset#0.NONE.], table=[[druid, messages]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 72783

Sets:
Set#0, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72798:Subset#0.NONE., best=null, importance=0.5904900000000001
rel#72783:LogicalTableScan.NONE.(table=[druid, messages]), rowcount=100.0, cumulative cost={inf}
rel#72824:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72828:Subset#0.DRUID., best=rel#72827, importance=0.29524500000000004
rel#72827:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={1.0 rows, 0.0 cpu, 0.0 io}
Set#1, type: RecordType(TIMESTAMP(3) __time, VARCHAR channel, VARCHAR company_id, VARCHAR country_code, VARCHAR message_id)
rel#72800:Subset#1.NONE., best=null, importance=0.6561
rel#72799:LogicalProject.NONE., rowcount=100.0, cumulative cost={inf}
rel#72826:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72843:Subset#1.DRUID., best=rel#72842, importance=0.32805
rel#72842:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:null,“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={1.005 rows, 0.0 cpu, 0.0 io}
Set#2, type: RecordType(TIMESTAMP(3) __time, VARCHAR channel, VARCHAR company_id, VARCHAR country_code, VARCHAR message_id)
rel#72802:Subset#2.NONE., best=null, importance=0.7290000000000001
rel#72801:LogicalFilter.NONE.(input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, CAST(‘2020-01-28 05:00:00.000’):TIMESTAMP(3) NOT NULL), <($0, CAST(‘2020-01-29 06:00:00.000’):TIMESTAMP(3) NOT NULL), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), importance=0.0, rowcount=1.0, cumulative cost={inf}
rel#72811:LogicalSort.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72815:LogicalFilter.NONE.[](input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72819:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72823:LogicalFilter.NONE.(input=rel#72800:Subset#1.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($2, ‘myco’), =($3, ‘US’), =($1, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72836:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72838:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72862:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72866:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72813:Subset#2.NONE.[4], best=null, importance=0.7290000000000001
rel#72811:LogicalSort.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72836:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72866:LogicalProject.NONE.4, rowcount=1.0, cumulative cost={inf}
rel#72852:Subset#2.DRUID., best=rel#72851, importance=0.36450000000000005
rel#72851:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“channel”,“company_id”,“country_code”,“message_id”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, channel:STRING, company_id:STRING, country_code:STRING, message_id:STRING}), rowcount=1.0, cumulative cost={0.10049999999999999 rows, 0.0 cpu, 0.0 io}
Set#3, type: RecordType(VARCHAR message_id)
rel#72804:Subset#3.NONE., best=null, importance=0.81
rel#72803:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72805:LogicalSort.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72814:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72820:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72833:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72837:DruidQueryRel.NONE., rowcount=1.0, cumulative cost={inf}
rel#72845:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72867:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72868:LogicalProject.NONE., rowcount=1.0, cumulative cost={inf}
rel#72880:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72809:Subset#3.NONE.[0], best=null, importance=0.9
rel#72805:LogicalSort.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72814:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72833:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72845:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72867:LogicalProject.NONE.[0], rowcount=1.0, cumulative cost={inf}
rel#72880:LogicalProject.NONE.0, rowcount=1.0, cumulative cost={inf}
rel#72810:Subset#3.DRUID.[0], best=null, importance=0.45
rel#72808:AbstractConverter.DRUID.0, rowcount=1.0, cumulative cost={inf}
rel#72850:Subset#3.DRUID., best=rel#72849, importance=0.45
rel#72808:AbstractConverter.DRUID.0, rowcount=1.0, cumulative cost={inf}
rel#72849:DruidQueryRel.DRUID., rowcount=1.0, cumulative cost={0.1001 rows, 0.0 cpu, 0.0 io}
Set#5, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72818:Subset#5.NONE., best=null, importance=0.6561
rel#72816:LogicalFilter.NONE.[](input=rel#72798:Subset#0.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($14, ‘myco’), =($19, ‘US’), =($12, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72825:DruidQueryRel.NONE.[](query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72830:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72832:Subset#5.NONE.[39], best=null, importance=0.6561
rel#72830:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72841:Subset#5.DRUID., best=rel#72840, importance=0.32805
rel#72840:DruidQueryRel.DRUID.[](query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={0.1 rows, 0.0 cpu, 0.0 io}
Set#6, type: RecordType(TIMESTAMP(3) __time, VARCHAR accepted_date, BIGINT accepted_ts, VARCHAR account_executive_account_id, VARCHAR account_id, VARCHAR account_manager_account_id, VARCHAR account_name, VARCHAR api_version, VARCHAR campaign_id, VARCHAR campaign_name, VARCHAR carrier_id, VARCHAR carrier_name, VARCHAR channel, VARCHAR charge_type, VARCHAR company_id, VARCHAR company_name, VARCHAR content, VARCHAR content_encoding, VARCHAR conversation_id, VARCHAR country_code, VARCHAR country_name, VARCHAR customer_message_id, VARCHAR customer_notification_date, BIGINT customer_notification_ts, VARCHAR customer_type, VARCHAR delivery_date, BIGINT delivery_ts, VARCHAR destination_address, VARCHAR destination_ton, VARCHAR dps_pipe, VARCHAR dps_version, VARCHAR identification_type, VARCHAR is_final, VARCHAR is_hashed, VARCHAR legal_entity, VARCHAR live_operator_lookup, VARCHAR maap, VARCHAR mccmnc, VARCHAR message_category, VARCHAR message_id, VARCHAR message_originator, VARCHAR message_originator_ton, VARCHAR message_status, VARCHAR message_type, VARCHAR note, VARCHAR operator_fee_category, VARCHAR originator_type, VARCHAR parent_message_id, VARCHAR phone_number, VARCHAR product_id, VARCHAR product_id_description, VARCHAR product_name, VARCHAR product_sub_type, VARCHAR program_id, VARCHAR remote_ip_address, VARCHAR remote_message_id, VARCHAR remote_response_code, VARCHAR reprocessed_date, BIGINT reprocessed_ts, VARCHAR response_code, VARCHAR response_code_description, VARCHAR root_account_id, VARCHAR root_account_name, VARCHAR source_address, VARCHAR source_ton, VARCHAR status_date, BIGINT status_ts, VARCHAR subaccount, VARCHAR submitted_first_date, BIGINT submitted_first_ts, VARCHAR submitted_last_date, BIGINT submitted_last_ts, VARCHAR submitted_ts_count, VARCHAR supplier_id, VARCHAR supplier_name, VARCHAR supplier_product_id, VARCHAR supplier_type, BIGINT time_to_customer_notification, BIGINT time_to_delivery, BIGINT time_to_failure, BIGINT time_to_first_submission, BIGINT time_to_last_submission, BIGINT time_total_submission, VARCHAR traffic_type, VARCHAR user_agent, VARCHAR user_data_header, VARCHAR user_defined1, VARCHAR user_defined2)
rel#72861:Subset#6.NONE., best=null, importance=0.6561
rel#72859:LogicalFilter.NONE.(input=rel#72798:Subset#0.NONE.,condition=AND(>=($0, 2020-01-28 05:00:00), <($0, 2020-01-29 06:00:00), =($14, ‘myco’), =($19, ‘US’), =($12, ‘xyz’))), rowcount=1.0, cumulative cost={inf}
rel#72863:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72869:DruidQueryRel.NONE.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={inf}
rel#72865:Subset#6.NONE.[39], best=null, importance=0.6561
rel#72863:LogicalSort.NONE.39, rowcount=1.0, cumulative cost={inf}
rel#72875:Subset#6.DRUID., best=rel#72874, importance=0.32805
rel#72874:DruidQueryRel.DRUID.(query={“queryType”:“scan”,“dataSource”:{“type”:“table”,“name”:“messages”},“intervals”:{“type”:“intervals”,“intervals”:[“2020-01-28T05:00:00.000Z/2020-01-29T06:00:00.000Z”]},“virtualColumns”:,“resultFormat”:“compactedList”,“batchSize”:20480,“limit”:9223372036854775807,“order”:“none”,“filter”:{“type”:“and”,“fields”:[{“type”:“selector”,“dimension”:“company_id”,“value”:“myco”,“extractionFn”:null},{“type”:“selector”,“dimension”:“country_code”,“value”:“US”,“extractionFn”:null},{“type”:“selector”,“dimension”:“channel”,“value”:“xyz”,“extractionFn”:null}]},“columns”:["__time",“accepted_date”,“accepted_ts”,“account_executive_account_id”,“account_id”,“account_manager_account_id”,“account_name”,“api_version”,“campaign_id”,“campaign_name”,“carrier_id”,“carrier_name”,“channel”,“charge_type”,“company_id”,“company_name”,“content”,“content_encoding”,“conversation_id”,“country_code”,“country_name”,“customer_message_id”,“customer_notification_date”,“customer_notification_ts”,“customer_type”,“delivery_date”,“delivery_ts”,“destination_address”,“destination_ton”,“dps_pipe”,“dps_version”,“identification_type”,“is_final”,“is_hashed”,“legal_entity”,“live_operator_lookup”,“maap”,“mccmnc”,“message_category”,“message_id”,“message_originator”,“message_originator_ton”,“message_status”,“message_type”,“note”,“operator_fee_category”,“originator_type”,“parent_message_id”,“phone_number”,“product_id”,“product_id_description”,“product_name”,“product_sub_type”,“program_id”,“remote_ip_address”,“remote_message_id”,“remote_response_code”,“reprocessed_date”,“reprocessed_ts”,“response_code”,“response_code_description”,“root_account_id”,“root_account_name”,“source_address”,“source_ton”,“status_date”,“status_ts”,“subaccount”,“submitted_first_date”,“submitted_first_ts”,“submitted_last_date”,“submitted_last_ts”,“submitted_ts_count”,“supplier_id”,“supplier_name”,“supplier_product_id”,“supplier_type”,“time_to_customer_notification”,“time_to_delivery”,“time_to_failure”,“time_to_first_submission”,“time_to_last_submission”,“time_total_submission”,“traffic_type”,“user_agent”,“user_data_header”,“user_defined1”,“user_defined2”],“legacy”:false,“context”:{“sqlQueryId”:“2b9f2dec-db20-4104-9983-aa4d3a348587”,“useApproximateCountDistinct”:“false”},“descending”:false,“granularity”:{“type”:“all”}},signature={__time:LONG, accepted_date:STRING, accepted_ts:LONG, account_executive_account_id:STRING, account_id:STRING, account_manager_account_id:STRING, account_name:STRING, api_version:STRING, campaign_id:STRING, campaign_name:STRING, carrier_id:STRING, carrier_name:STRING, channel:STRING, charge_type:STRING, company_id:STRING, company_name:STRING, content:STRING, content_encoding:STRING, conversation_id:STRING, country_code:STRING, country_name:STRING, customer_message_id:STRING, customer_notification_date:STRING, customer_notification_ts:LONG, customer_type:STRING, delivery_date:STRING, delivery_ts:LONG, destination_address:STRING, destination_ton:STRING, dps_pipe:STRING, dps_version:STRING, identification_type:STRING, is_final:STRING, is_hashed:STRING, legal_entity:STRING, live_operator_lookup:STRING, maap:STRING, mccmnc:STRING, message_category:STRING, message_id:STRING, message_originator:STRING, message_originator_ton:STRING, message_status:STRING, message_type:STRING, note:STRING, operator_fee_category:STRING, originator_type:STRING, parent_message_id:STRING, phone_number:STRING, product_id:STRING, product_id_description:STRING, product_name:STRING, product_sub_type:STRING, program_id:STRING, remote_ip_address:STRING, remote_message_id:STRING, remote_response_code:STRING, reprocessed_date:STRING, reprocessed_ts:LONG, response_code:STRING, response_code_description:STRING, root_account_id:STRING, root_account_name:STRING, source_address:STRING, source_ton:STRING, status_date:STRING, status_ts:LONG, subaccount:STRING, submitted_first_date:STRING, submitted_first_ts:LONG, submitted_last_date:STRING, submitted_last_ts:LONG, submitted_ts_count:STRING, supplier_id:STRING, supplier_name:STRING, supplier_product_id:STRING, supplier_type:STRING, time_to_customer_notification:LONG, time_to_delivery:LONG, time_to_failure:LONG, time_to_first_submission:LONG, time_to_last_submission:LONG, time_total_submission:LONG, traffic_type:STRING, user_agent:STRING, user_data_header:STRING, user_defined1:STRING, user_defined2:STRING}), rowcount=1.0, cumulative cost={0.1 rows, 0.0 cpu, 0.0 io}

SQLState: 00000
ErrorCode: -1

Hi Daniel,

For non-aggregation queries, ORDER BY can only order by the __time column. For aggregation queries, ORDER BY can order by any column.

RefLink:
https://druid.apache.org/docs/latest/querying/sql.html

In your case, none of the queries are aggregation queries.

query-1 and query-2 worked as (1) dont have order by and (2) have orderby ‘__time’ which is valid.

query-2 and query-3 did not work as they are having order other than ‘__time’ .

Thank and Regards,

Vaibhav