Enum Class EngineFeature

java.lang.Object
java.lang.Enum<EngineFeature>
org.apache.druid.sql.calcite.run.EngineFeature
All Implemented Interfaces:
Serializable, Comparable<EngineFeature>, Constable

public enum EngineFeature extends Enum<EngineFeature>
  • Enum Constant Details

    • CAN_SELECT

      public static final EngineFeature CAN_SELECT
      Can execute SELECT statements.
    • CAN_INSERT

      public static final EngineFeature CAN_INSERT
      Can execute INSERT statements.
    • CAN_REPLACE

      public static final EngineFeature CAN_REPLACE
      Can execute REPLACE statements.
    • TIMESERIES_QUERY

      public static final EngineFeature TIMESERIES_QUERY
      Queries of type TimeseriesQuery are usable.
    • TOPN_QUERY

      public static final EngineFeature TOPN_QUERY
      Queries of type TopNQuery are usable.
    • TIME_BOUNDARY_QUERY

      public static final EngineFeature TIME_BOUNDARY_QUERY
      Queries of type TimeBoundaryQuery are usable.
    • READ_EXTERNAL_DATA

      public static final EngineFeature READ_EXTERNAL_DATA
      Queries can use ExternalDataSource.
    • SCAN_ORDER_BY_NON_TIME

      public static final EngineFeature SCAN_ORDER_BY_NON_TIME
      Scan queries can use ScanQuery.getOrderBys() that are based on something other than the "__time" column.
    • ALLOW_BINDABLE_PLAN

      public static final EngineFeature ALLOW_BINDABLE_PLAN
      Planner is permitted to use a Bindable plan on local resources, instead of QueryMaker, for SELECT query implementation. Used for system tables and the like.
    • GROUPING_SETS

      public static final EngineFeature GROUPING_SETS
      Queries can use GROUPING SETS.
    • WINDOW_FUNCTIONS

      public static final EngineFeature WINDOW_FUNCTIONS
      Queries can use window functions.
    • WINDOW_LEAF_OPERATOR

      public static final EngineFeature WINDOW_LEAF_OPERATOR
      Used to ignore leaf operators when planning for MSQ engine
    • UNNEST

      public static final EngineFeature UNNEST
      Queries can use SqlStdOperatorTable.UNNEST.
    • ALLOW_BROADCAST_RIGHTY_JOIN

      public static final EngineFeature ALLOW_BROADCAST_RIGHTY_JOIN
      Planner is permitted to use JoinAlgorithm.BROADCAST with RIGHT and FULL join. Not guaranteed to produce correct results in either the native or MSQ engines, but we allow it in native for two reasons: legacy (the docs caution against it, but it's always been allowed), and the fact that it actually *does* generate correct results in native when the join is processed on the Broker. It is much less likely that MSQ will plan in such a way that generates correct results.
    • ALLOW_TOP_LEVEL_UNION_ALL

      public static final EngineFeature ALLOW_TOP_LEVEL_UNION_ALL
      Planner is permitted to use DruidUnionRel to plan the top level UNION ALL. This is to dissuade planner from accepting and running the UNION ALL queries that are not supported by engines (primarily MSQ). Due to the nature of the exeuction of the top level UNION ALLs (we run the individual queries and concat the results), it only makes sense to enable this on engines where the queries return the results synchronously Planning queries with top level UNION_ALL leads to undesirable behaviour with asynchronous engines like MSQ. To enumerate this behaviour for MSQ, the broker attempts to run the individual queries as MSQ queries in succession, submits the first query correctly, fails on the rest of the queries (due to conflicting taskIds), and cannot concat the results together (as * the result for broker is the query id). Therefore, we don't get the correct result back, while the MSQ engine is executing the partial query
    • WRITE_EXTERNAL_DATA

      public static final EngineFeature WRITE_EXTERNAL_DATA
      Queries can write to an external datasource using ExportDestination
    • GROUPBY_IMPLICITLY_SORTS

      public static final EngineFeature GROUPBY_IMPLICITLY_SORTS
      Whether GROUP BY implies an ORDER BY on the same fields. There are two reasons we need this: (1) We may want MSQ to hash-partition for GROUP BY instead of using a global sort, which would mean MSQ would not implicitly ORDER BY when there is a GROUP BY. (2) When doing REPLACE with MSQ, CLUSTERED BY is transformed to ORDER BY. We need to retain that ORDER BY, as it may be a subset of the GROUP BY, and it is important to remember which fields the user wanted to include in DimensionRangeShardSpec.
  • Method Details

    • values

      public static EngineFeature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EngineFeature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null