Query context

    • For Druid SQL, context parameters are provided either as a JSON object named to the HTTP POST API, or as properties to the JDBC connection.
    • For , context parameters are provided as a JSON object named context.

    Note that setting query context will override both the default value and the runtime properties value in the format of druid.query.default.context.{property_key} (if set).

    In addition, some query types offer context parameters specific to that query type.

    The GroupBy and Timeseries query types can run in vectorized mode, which speeds up query execution by processing batches of rows at a time. Not all queries can be vectorized. In particular, vectorization currently has the following requirements:

    • All query-level filters must either be able to run on bitmap indexes or must offer vectorized row-matchers. These include “selector”, “bound”, “in”, “like”, “regex”, “search”, “and”, “or”, and “not”.
    • All filters in filtered aggregators must offer vectorized row-matchers.
    • All aggregators must offer vectorized implementations. These include “count”, “doubleSum”, “floatSum”, “longSum”, “longMin”, “longMax”, “doubleMin”, “doubleMax”, “floatMin”, “floatMax”, “longAny”, “doubleAny”, “floatAny”, “stringAny”, “hyperUnique”, “filtered”, “approxHistogram”, “approxHistogramFold”, and “fixedBucketsHistogram” (with numerical input).
    • For GroupBy: All dimension specs must be “default” (no extraction functions or filtered dimension specs).
    • For GroupBy: No multi-value dimensions.
    • For Timeseries: No “descending” order.
    • Only immutable segments (not real-time).
    • Only table datasources (not joins, subqueries, lookups, or inline datasources).