Package org.apache.druid.sql.calcite.run
Enum Class EngineFeature
- All Implemented Interfaces:
Serializable,Comparable<EngineFeature>,Constable
Arguments to
SqlEngine.featureAvailable(EngineFeature).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlanner is permitted to use aBindableplan on local resources, instead ofQueryMaker, for SELECT query implementation.Planner is permitted to useJoinAlgorithm.BROADCASTwith RIGHT and FULL join.Planner is permitted to useDruidUnionRelto plan the top level UNION ALL.Can execute INSERT statements.Can execute REPLACE statements.Can execute SELECT statements.Whether GROUP BY implies an ORDER BY on the same fields.Queries can use GROUPING SETS.Queries can useExternalDataSource.Scan queries can useScanQuery.getOrderBys()that are based on something other than the "__time" column.Queries of typeTimeBoundaryQueryare usable.Queries of typeTimeseriesQueryare usable.Queries of typeTopNQueryare usable.Queries can useSqlStdOperatorTable.UNNEST.Queries can use window functions.Used to ignore leaf operators when planning for MSQ engineQueries can write to an external datasource usingExportDestination -
Method Summary
Modifier and TypeMethodDescriptionstatic EngineFeatureReturns the enum constant of this class with the specified name.static EngineFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CAN_SELECT
Can execute SELECT statements. -
CAN_INSERT
Can execute INSERT statements. -
CAN_REPLACE
Can execute REPLACE statements. -
TIMESERIES_QUERY
Queries of typeTimeseriesQueryare usable. -
TOPN_QUERY
Queries of typeTopNQueryare usable. -
TIME_BOUNDARY_QUERY
Queries of typeTimeBoundaryQueryare usable. -
READ_EXTERNAL_DATA
Queries can useExternalDataSource. -
SCAN_ORDER_BY_NON_TIME
Scan queries can useScanQuery.getOrderBys()that are based on something other than the "__time" column. -
ALLOW_BINDABLE_PLAN
Planner is permitted to use aBindableplan on local resources, instead ofQueryMaker, for SELECT query implementation. Used for system tables and the like. -
GROUPING_SETS
Queries can use GROUPING SETS. -
WINDOW_FUNCTIONS
Queries can use window functions. -
WINDOW_LEAF_OPERATOR
Used to ignore leaf operators when planning for MSQ engine -
UNNEST
Queries can useSqlStdOperatorTable.UNNEST. -
ALLOW_BROADCAST_RIGHTY_JOIN
Planner is permitted to useJoinAlgorithm.BROADCASTwith 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
Planner is permitted to useDruidUnionRelto 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
Queries can write to an external datasource usingExportDestination -
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 inDimensionRangeShardSpec.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-