public class PlannerContext extends Object
PlannerConfig, but that has static configuration and this class contains dynamic, per-query
configuration.| Modifier and Type | Field and Description |
|---|---|
static String |
CTX_SQL_CURRENT_TIMESTAMP |
static String |
CTX_SQL_OUTER_LIMIT |
static String |
CTX_SQL_QUERY_ID |
static String |
CTX_SQL_STRINGIFY_ARRAYS |
static String |
CTX_SQL_TIME_ZONE |
static String |
DATA_CTX_AUTHENTICATION_RESULT |
| Modifier and Type | Method and Description |
|---|---|
void |
addNativeQueryId(String queryId) |
static PlannerContext |
create(String sql,
DruidOperatorTable operatorTable,
ExprMacroTable macroTable,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
PlannerConfig plannerConfig,
DruidSchemaCatalog rootSchema,
SqlEngine engine,
QueryContext queryContext) |
org.apache.calcite.DataContext |
createDataContext(org.apache.calcite.adapter.java.JavaTypeFactory typeFactory,
List<org.apache.calcite.avatica.remote.TypedValue> parameters) |
boolean |
engineHasFeature(EngineFeature feature) |
AuthenticationResult |
getAuthenticationResult() |
Access |
getAuthorizationResult() |
SqlEngine |
getEngine() |
ExprMacroTable |
getExprMacroTable() |
VirtualColumnRegistry |
getJoinExpressionVirtualColumnRegistry() |
com.fasterxml.jackson.databind.ObjectMapper |
getJsonMapper() |
org.joda.time.DateTime |
getLocalNow() |
CopyOnWriteArrayList<String> |
getNativeQueryIds() |
DruidOperatorTable |
getOperatorTable() |
List<org.apache.calcite.avatica.remote.TypedValue> |
getParameters() |
PlannerConfig |
getPlannerConfig() |
String |
getPlanningError() |
QueryContext |
getQueryContext() |
QueryMaker |
getQueryMaker() |
Set<ResourceAction> |
getResourceActions() |
String |
getSchemaResourceType(String schema,
String resourceName) |
String |
getSql() |
String |
getSqlQueryId() |
org.joda.time.DateTimeZone |
getTimeZone() |
boolean |
isStringifyArrays() |
void |
setAuthenticationResult(AuthenticationResult authenticationResult) |
void |
setAuthorizationResult(Access access) |
void |
setJoinExpressionVirtualColumnRegistry(VirtualColumnRegistry joinExpressionVirtualColumnRegistry) |
void |
setParameters(List<org.apache.calcite.avatica.remote.TypedValue> parameters) |
void |
setPlanningError(String formatText,
Object... arguments)
Sets the planning error in the context that will be shown to the user if the SQL query cannot be translated
to a native query.
|
void |
setQueryMaker(QueryMaker queryMaker) |
void |
setResourceActions(Set<ResourceAction> resourceActions) |
public static final String CTX_SQL_QUERY_ID
public static final String CTX_SQL_CURRENT_TIMESTAMP
public static final String CTX_SQL_TIME_ZONE
public static final String CTX_SQL_STRINGIFY_ARRAYS
public static final String CTX_SQL_OUTER_LIMIT
public static final String DATA_CTX_AUTHENTICATION_RESULT
public static PlannerContext create(String sql, DruidOperatorTable operatorTable, ExprMacroTable macroTable, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, PlannerConfig plannerConfig, DruidSchemaCatalog rootSchema, SqlEngine engine, QueryContext queryContext)
public DruidOperatorTable getOperatorTable()
public ExprMacroTable getExprMacroTable()
public com.fasterxml.jackson.databind.ObjectMapper getJsonMapper()
public PlannerConfig getPlannerConfig()
public org.joda.time.DateTime getLocalNow()
public org.joda.time.DateTimeZone getTimeZone()
@Nullable public String getSchemaResourceType(String schema, String resourceName)
public QueryContext getQueryContext()
public boolean isStringifyArrays()
public List<org.apache.calcite.avatica.remote.TypedValue> getParameters()
public AuthenticationResult getAuthenticationResult()
public String getSql()
public String getSqlQueryId()
public CopyOnWriteArrayList<String> getNativeQueryIds()
public void addNativeQueryId(String queryId)
public void setPlanningError(String formatText, Object... arguments)
public org.apache.calcite.DataContext createDataContext(org.apache.calcite.adapter.java.JavaTypeFactory typeFactory,
List<org.apache.calcite.avatica.remote.TypedValue> parameters)
public Access getAuthorizationResult()
public void setParameters(List<org.apache.calcite.avatica.remote.TypedValue> parameters)
public void setAuthenticationResult(AuthenticationResult authenticationResult)
public void setAuthorizationResult(Access access)
public Set<ResourceAction> getResourceActions()
public void setResourceActions(Set<ResourceAction> resourceActions)
public void setQueryMaker(QueryMaker queryMaker)
public SqlEngine getEngine()
public boolean engineHasFeature(EngineFeature feature)
public QueryMaker getQueryMaker()
public VirtualColumnRegistry getJoinExpressionVirtualColumnRegistry()
public void setJoinExpressionVirtualColumnRegistry(VirtualColumnRegistry joinExpressionVirtualColumnRegistry)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.