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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: druid
    • Labels:
      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.

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/435e2030. Documentation has not yet been updated, but I will do it before 1.8 is announced.

        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/435e2030 . Documentation has not yet been updated, but I will do it before 1.8 is announced.
        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.8.0 (2016-06-13).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.8.0 (2016-06-13).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development