Interface SqlValidator.Config
- Enclosing interface:
- SqlValidator
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanReturns whether to enable rewrite of "macro-like" calls such as COALESCE.default booleanReturns whether column reference expansion is enabled.default SqlConformanceReturns the dialect of SQL (SQL:2003, etc.) this validator recognizes.default NullCollationReturns how NULL values should be collated if an ORDER BY item does not contain NULLS FIRST or NULLS LAST.default booleanReturns whether to treat the query being validated as embedded (as opposed to top-level).default booleanReturns whether to expand identifiers other than column references.default booleanReturns whether this validator should be lenient upon encountering an unknown function, default false.default booleanReturns whether the validator allows measures to be used without AGGREGATE function in an aggregate query.default booleanReturns whether the validator allows measures to be used without AGGREGATE function in a non-aggregate query.default SqlConformanceDeprecated.default booleanReturns whether the validator supports implicit type coercion.Returns the type coercion factory.@Nullable SqlTypeCoercionRuleReturns the type coercion rules for explicit type coercion.withCallRewrite(boolean rewrite) Sets whether to enable rewrite of "macro-like" calls such as COALESCE.withColumnReferenceExpansion(boolean expand) Sets whether to enable expansion of column references.withConformance(SqlConformance conformance) Sets the SQL conformance of the validator.withDefaultNullCollation(NullCollation nullCollation) Sets how NULL values should be collated if an ORDER BY item does not contain NULLS FIRST or NULLS LAST.withEmbeddedQuery(boolean embedded) Sets whether to treat the query being validated as embedded (as opposed to top-level).withIdentifierExpansion(boolean expand) Sets whether to enable expansion of identifiers other than column references.withLenientOperatorLookup(boolean lenient) Sets whether this validator should be lenient upon encountering an unknown function.default SqlValidator.ConfigwithNakedMeasures(boolean nakedMeasures) Deprecated.withNakedMeasuresInAggregateQuery(boolean value) Sets whether the validator allows measures to be used without AGGREGATE function in an aggregate query.withNakedMeasuresInNonAggregateQuery(boolean value) Sets whether the validator allows measures to be used without AGGREGATE function in a non-aggregate query.default SqlValidator.ConfigwithSqlConformance(SqlConformance conformance) Deprecated.Useconformance()withTypeCoercionEnabled(boolean enabled) Sets whether to enable implicit type coercion for validation, default true.Sets a factory to create type coercion instance that overrides the default coercion rules defined inTypeCoercionImpl.withTypeCoercionRules(@Nullable SqlTypeCoercionRule rules) Sets theSqlTypeCoercionRuleinstance which defines the type conversion matrix for the explicit type coercion.
- 
Field Details- 
DEFAULTDefault configuration.
 
- 
- 
Method Details- 
callRewrite@Default default boolean callRewrite()Returns whether to enable rewrite of "macro-like" calls such as COALESCE.
- 
withCallRewriteSets whether to enable rewrite of "macro-like" calls such as COALESCE.
- 
defaultNullCollationReturns how NULL values should be collated if an ORDER BY item does not contain NULLS FIRST or NULLS LAST.
- 
withDefaultNullCollationSets how NULL values should be collated if an ORDER BY item does not contain NULLS FIRST or NULLS LAST.
- 
columnReferenceExpansion@Default default boolean columnReferenceExpansion()Returns whether column reference expansion is enabled.
- 
withColumnReferenceExpansionSets whether to enable expansion of column references. (Currently this does not apply to the ORDER BY clause; may be fixed in the future.)
- 
identifierExpansion@Default default boolean identifierExpansion()Returns whether to expand identifiers other than column references.REVIEW jvs 30-June-2006: subclasses may override shouldExpandIdentifiers in a way that ignores this; we should probably get rid of the protected method and always use this variable (or better, move preferences like this to a separate "parameter" class). 
- 
withIdentifierExpansionSets whether to enable expansion of identifiers other than column references.
- 
embeddedQuery@Default default boolean embeddedQuery()Returns whether to treat the query being validated as embedded (as opposed to top-level).The default, false, treats the query as top-level; a value of true treats it as a query inside another, as would be the case for a view or common table expression. Possible behavior differences include ignoring the ORDER BYclause of an embedded query, or converting measure expressions of a non-embedded query into values.
- 
withEmbeddedQuerySets whether to treat the query being validated as embedded (as opposed to top-level).
- 
lenientOperatorLookup@Default default boolean lenientOperatorLookup()Returns whether this validator should be lenient upon encountering an unknown function, default false.If true, if a statement contains a call to a function that is not present in the operator table, or if the call does not have the required number or types of operands, the validator nevertheless regards the statement as valid. The type of the function call will be UNKNOWN.If false (the default behavior), an unknown function call causes a validation error to be thrown. 
- 
withLenientOperatorLookupSets whether this validator should be lenient upon encountering an unknown function.- Parameters:
- lenient- Whether to be lenient when encountering an unknown function
 
- 
nakedMeasuresInNonAggregateQuery@Default default boolean nakedMeasuresInNonAggregateQuery()Returns whether the validator allows measures to be used without AGGREGATE function in a non-aggregate query. Default is true.
- 
withNakedMeasuresInNonAggregateQuerySets whether the validator allows measures to be used without AGGREGATE function in a non-aggregate query.
- 
nakedMeasuresInAggregateQuery@Default default boolean nakedMeasuresInAggregateQuery()Returns whether the validator allows measures to be used without AGGREGATE function in an aggregate query. Default is true.
- 
withNakedMeasuresInAggregateQuerySets whether the validator allows measures to be used without AGGREGATE function in an aggregate query.
- 
withNakedMeasuresDeprecated.Sets whether the validator allows measures to be used without the AGGREGATE function inside or outside aggregate queries. Deprecated: use the inside / outside variants instead.
- 
typeCoercionEnabled@Default default boolean typeCoercionEnabled()Returns whether the validator supports implicit type coercion.
- 
withTypeCoercionEnabledSets whether to enable implicit type coercion for validation, default true.- See Also:
 
- 
typeCoercionFactoryTypeCoercionFactory typeCoercionFactory()Returns the type coercion factory.
- 
withTypeCoercionFactorySets a factory to create type coercion instance that overrides the default coercion rules defined inTypeCoercionImpl.- Parameters:
- factory- Factory to create- TypeCoercioninstance
 
- 
typeCoercionRules@Nullable SqlTypeCoercionRule typeCoercionRules()Returns the type coercion rules for explicit type coercion.
- 
withTypeCoercionRulesSets theSqlTypeCoercionRuleinstance which defines the type conversion matrix for the explicit type coercion.The rulessetting should be thread safe. In the default implementation, it is set to a ThreadLocal variable.- Parameters:
- rules- The- SqlTypeCoercionRuleinstance, see its documentation for how to customize the rules
 
- 
conformanceReturns the dialect of SQL (SQL:2003, etc.) this validator recognizes. Default isSqlConformanceEnum.DEFAULT.
- 
sqlConformanceDeprecated.Useconformance()Returns the SQL conformance.
- 
withConformanceSets the SQL conformance of the validator.
- 
withSqlConformanceDeprecated.Useconformance()Sets the SQL conformance of the validator.
 
- 
conformance()