Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16835

Replace TableConfig with Configuration

    XMLWordPrintableJSON

Details

    Description

      In order to allow reading and writing of configuration from a file or string-based properties. We should consider removing TableConfig and fully rely on a Configuration-based object with ConfigOptions.

      This effort was partially already started which is why TableConfig.getConfiguration exists.

      However, we should clarify if we would like to have control and traceability over layered configurations such as flink-conf,yaml < StreamExecutionEnvironment < TableEnvironment < Query. Maybe the Configuration class is not the right abstraction for this.

      jark, twalthr, and fhueske discussed the configuration options (see comments below) and concluded with the following design:

        public static final ConfigOption<Duration> IDLE_STATE_RETENTION =
            key("table.exec.state.ttl")
                .durationType()
                .defaultValue(Duration.ofMillis(0));
      
        public static final ConfigOption<Integer> MAX_LENGTH_GENERATED_CODE =
            key("table.generated-code.max-length")
                .intType()
                .defaultValue(64000);
      
        public static final ConfigOption<String> LOCAL_TIME_ZONE =
            key("table.local-time-zone")
                .stringType()
                .defaultValue(ZoneId.systemDefault().toString());
      

      Note: The following TableConfig options are not preserved:

      • nullCheck: Flink will automatically enable null checks based on the table schema (NOT NULL property)
      • decimalContext: this configuration is only used by the legacy planner which will be removed in one of the next releases
      • maxIdleStateRetention: is automatically derived as 1.5* idleStateRetention until StateTtlConfig is fully supported (at which point only a single parameter is required).

      Attachments

        Issue Links

          Activity

            People

              matriv Marios Trivyzas
              twalthr Timo Walther
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: