Leverage the existing code in Calcite (
CALCITE-1121) to push operators into DruidQuery. Currently Project, Filter, and Aggregate operators can be pushed, and Druid Select and GroupBy queries are recognized. However, other query types such as Timeseries and TopN, which are known to be Druid greater assets, are not recognized as such.
Hence, we should extend the Calcite based code to push operators into DruidQuery (Scan) that can lead to the recognition of these query types. Further, we need to extend the logic to transform a DruidQuery containing a complex plan into a JSON query formatted for Druid.