Class CalciteSystemProperty<T>

Type Parameters:
T - the type of the property value

public final class CalciteSystemProperty<T> extends Object
A Calcite specific system property that is used to configure various aspects of the framework.

Calcite system properties must always be in the "calcite" root namespace.

  • Field Details

    • DEBUG

      public static final CalciteSystemProperty<Boolean> DEBUG
      Whether to run Calcite in debug mode.

      When debug mode is activated significantly more information is gathered and printed to STDOUT. It is most commonly used to print and identify problems in generated java code. Debug mode is also used to perform more verifications at runtime, which are not performed during normal execution.


      public static final CalciteSystemProperty<Boolean> COMMUTE
      Whether to exploit join commutative property.

      public static final CalciteSystemProperty<Boolean> ENABLE_COLLATION_TRAIT
      Whether to enable the collation trait in the default planner configuration.

      Some extra optimizations are possible if enabled, but queries should work either way. At some point this will become a preference, or we will run multiple phases: first disabled, then enabled.


      public static final CalciteSystemProperty<Boolean> ENABLE_ENUMERABLE
      Whether the enumerable convention is enabled in the default planner configuration.

      public static final CalciteSystemProperty<Boolean> ENUMERABLE_ENABLE_TABLESCAN_ARRAY
      Whether the EnumerableTableScan should support ARRAY fields.

      public static final CalciteSystemProperty<Boolean> ENUMERABLE_ENABLE_TABLESCAN_MAP
      Whether the EnumerableTableScan should support MAP fields.

      public static final CalciteSystemProperty<Boolean> ENUMERABLE_ENABLE_TABLESCAN_MULTISET
      Whether the EnumerableTableScan should support MULTISET fields.

      public static final CalciteSystemProperty<Boolean> ENABLE_STREAM
      Whether streaming is enabled in the default planner configuration.

      public static final CalciteSystemProperty<Boolean> ENABLE_REX_DIGEST_NORMALIZE
      Whether RexNode digest should be normalized (e.g. call operands ordered).

      Normalization helps to treat $0=$1 and $1=$0 expressions equal, thus it saves efforts on planning.

    • STRICT

      public static final CalciteSystemProperty<Boolean> STRICT
      Whether to follow the SQL standard strictly.

      public static final CalciteSystemProperty<Boolean> DUMP_GRAPHVIZ
      Whether to include a GraphViz representation when dumping the state of the Volcano planner.

      public static final CalciteSystemProperty<Boolean> DUMP_SETS
      Whether to include RelSet information when dumping the state of the Volcano planner.

      public static final CalciteSystemProperty<Boolean> TOPDOWN_OPT
      Whether to enable top-down optimization. This config can be overridden by CalciteConnectionProperty.TOPDOWN_OPT.

      Note: Enabling top-down optimization will automatically disable the use of AbstractConverter and related rules.


      public static final CalciteSystemProperty<Boolean> INTEGRATION_TEST
      Whether to run integration tests.
    • TEST_DB

      public static final CalciteSystemProperty<String> TEST_DB
      Which database to use for tests that require a JDBC data source.

      The property can take one of the following values:

      • HSQLDB (default)
      • H2
      • MYSQL
      • ORACLE

      If the specified value is not included in the previous list, the default is used.

      We recommend that casual users use hsqldb, and frequent Calcite developers use MySQL. The test suite runs faster against the MySQL database (mainly because of the 0.1 second versus 6 seconds startup time). You have to populate MySQL manually with the foodmart data set, otherwise there will be test failures.


      public static final CalciteSystemProperty<String> TEST_DATASET_PATH
      Path to the dataset file that should used for integration tests.

      If a path is not set, then one of the following values will be used:

      • ../calcite-test-dataset
      • ../../calcite-test-dataset
      • .
      The first valid path that exists in the filesystem will be chosen.

      public static final CalciteSystemProperty<Boolean> TEST_ARROW
      Whether to run Arrow tests.

      public static final CalciteSystemProperty<Boolean> TEST_MONGODB
      Whether to run MongoDB tests.

      public static final CalciteSystemProperty<Boolean> TEST_SPLUNK
      Whether to run Splunk tests.

      Disabled by default, because we do not expect Splunk to be installed and populated with the data set necessary for testing.


      public static final CalciteSystemProperty<Boolean> TEST_DRUID
      Whether to run Druid tests.

      public static final CalciteSystemProperty<Boolean> TEST_CASSANDRA
      Whether to run Cassandra tests.

      public static final CalciteSystemProperty<Boolean> TEST_INNODB
      Whether to run InnoDB tests.

      public static final CalciteSystemProperty<Boolean> TEST_REDIS
      Whether to run Redis tests.

      public static final CalciteSystemProperty<Boolean> TEST_WITH_DOCKER_CONTAINER
      Whether to use Docker containers in tests.

      If the property is set to true, affected tests will attempt to start Docker containers; when Docker is not available tests fallback to other execution modes and if it's not possible they are skipped entirely.

      If the property is set to false, Docker containers are not used at all and affected tests either fallback to other execution modes or skipped entirely.

      Users can override the default behavior to force non-Dockerized execution even when Docker is installed on the machine; this can be useful for replicating an issue that appears only in non-docker test mode or for running tests both with and without containers in CI.


      public static final CalciteSystemProperty<@Nullable String> TEST_FOODMART_QUERY_IDS
      A list of ids designating the queries (from query.json in new.hydromatic:foodmart-queries:0.4.1) that should be run as part of FoodmartTest.

      public static final CalciteSystemProperty<Boolean> ALLOW_INFINITE_COST_CONVERTERS
      Whether the optimizer will consider adding converters of infinite cost in order to convert a relational expression from one calling convention to another.

      public static final CalciteSystemProperty<String> DEFAULT_CHARSET
      The name of the default character set.

      It is used by SqlValidator.


      public static final CalciteSystemProperty<String> DEFAULT_NATIONAL_CHARSET
      The name of the default national character set.

      It is used with the N'string' construct in SqlLiteral and may be different from the DEFAULT_CHARSET.


      public static final CalciteSystemProperty<String> DEFAULT_COLLATION
      The name of the default collation.

      It is used in SqlCollation and SqlLiteral.


      public static final CalciteSystemProperty<String> DEFAULT_COLLATION_STRENGTH
      The strength of the default collation. Allowed values (as defined in Collator) are: primary, secondary, tertiary, identical.

      It is used in SqlCollation and SqlLiteral.


      public static final CalciteSystemProperty<Integer> METADATA_HANDLER_CACHE_MAXIMUM_SIZE
      The maximum size of the cache of metadata handlers.

      A typical value is the number of queries being concurrently prepared multiplied by the number of types of metadata.

      If the value is less than 0, there is no limit.


      public static final CalciteSystemProperty<Integer> BINDABLE_CACHE_MAX_SIZE
      The maximum size of the cache used for storing Bindable objects, instantiated via dynamically generated Java classes.

      The default value is 0.

      The property can take any value between [0, Integer.MAX_VALUE] inclusive. If the value is not valid (or not specified) then the default value is used.

      The cached objects may be quite big so it is suggested to use a rather small cache size (e.g., 1000). For the most common use cases a number close to 1000 should be enough to alleviate the performance penalty of compiling and loading classes.

      Setting this property to 0 disables the cache.


      public static final CalciteSystemProperty<Integer> BINDABLE_CACHE_CONCURRENCY_LEVEL
      The concurrency level of the cache used for storing Bindable objects, instantiated via dynamically generated Java classes.

      The default value is 1.

      The property can take any value between [1, Integer.MAX_VALUE] inclusive. If the value is not valid (or not specified) then the default value is used.

      This property has no effect if the cache is disabled (i.e., BINDABLE_CACHE_MAX_SIZE set to 0.


      public static final CalciteSystemProperty<Integer> FUNCTION_LEVEL_CACHE_MAX_SIZE
      The maximum number of items in a function-level cache.

      A few SQL functions have expensive processing that, if its results are cached, can be reused by future calls to the function. One such function is RLIKE, whose arguments are a regular expression and a string. The regular expression needs to be compiled to a Pattern. Compilation is expensive, and within a particular query, the arguments are often the same string, or a small number of distinct strings, so caching makes sense.

      Therefore, functions such as RLIKE, SIMILAR TO, PARSE_URL, PARSE_TIMESTAMP, FORMAT_DATE have a function-level cache. The cache is created in the code generated for the query, at the call site of the function, and expires when the query has finished executing. Such caches do not need time-based expiration, but we need to cap the size of the cache to deal with scenarios such as a billion-row table where every row has a distinct regular expression.

      Because of how Calcite generates and executes code in Enumerable convention, each function object is used from a single thread. Therefore, non thread-safe objects such as DateFormat can be safely cached.

      The value of this parameter limits the size of every function-level cache in Calcite. The default value is 1,000.

  • Method Details

    • value

      public T value()
      Returns the value of this property.
      the value of this property or null if a default value has not been defined for this property.