Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1276

In Druid adapter, deduce columns by running a "segmentMetadata" query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • druid-adapter
    • None

    Description

      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 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:

      jdbc:calcite:schema=wiki; schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory; schema.url=http://localhost:8082; schema.coordinatorUrl=http://localhost:8081
      

      By the way, those URLs are the same as the defaults, and if you don't care about the schema name the following will suffice:

      jdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory
      

      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.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: