Julian Hyde created CALCITE-1276:
------------------------------------
Summary: In Druid adapter, deduce columns by running a
"segmentMetadata" query
Key: CALCITE-1276
URL: https://issues.apache.org/jira/browse/CALCITE-1276
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
In Druid adapter, deduce columns by running a "segmentMetadata" query.
Currently a Druid model must contain "dimensions" and "metrics" fields. If
either of these are absent, Calcite should run a [segment metadata
query|http://druid.io/docs/latest/querying/segmentmetadataquery.html] and take
the resulting "columns" and "aggregators" fields and make them into columns.
The effect will be that the Druid adapter will be easier to configure. You will
be able to connect without a model, per CALCITE-1259:
{code}
jdbc:calcite:schema=wiki; schemaFactory=
org.apache.calcite.adapter.druid.DruidSchemaFactory;
schema.url=http://localhost:8082/druid/v2/?pretty
{code}
It will also adapt to schema changes. If there are multiple segments, and the
schema evolves over time, I suppose that the segments might have different
columns and aggregators. Calcite should use {{"merge": true,
"lenientAggregatorMerge": false}} to combine them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)