[ 
https://issues.apache.org/jira/browse/FLINK-16835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17140575#comment-17140575
 ] 

Fabian Hueske commented on FLINK-16835:
---------------------------------------

I'd like to make a proposal for the configuration options for configuring the 
TableConfig.

 
{code:java}
public static final ConfigOption<Boolean> NULL_CHECK =
    key("table.null-check.enabled")
        .booleanType()
        .defaultValue(true);

public static final ConfigOption<Duration> MIN_IDLE_STATE_RETENTION =
    key("table.idle-state.retention.min")
        .durationType()
        .defaultValue(Duration.ofMillis(0));

public static final ConfigOption<Duration> MAX_IDLE_STATE_RETENTION =
    key("table.idle-state.retention.max")
        .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> DECIMAL_CONTEXT =
    key("table.decimal-context")
        .stringType()
        .defaultValue(MathContext.DECIMAL128.toString());

public static final ConfigOption<String> LOCAL_TIMEZONE =
    key("table.local-timezone")
        .stringType()
        .defaultValue(ZoneId.systemDefault().toString());
{code}
The default values are taken from {{TableConfig}}. The ZoneId and MathContext 
need to be parsed from the String representation in the configuration 
(MathContext and ZoneId have corresponding parsing methods).

I'd like to get some feedback especially on the option keys.

CC: [~twalthr], [~jark] 

 

> Replace TableConfig with Configuration
> --------------------------------------
>
>                 Key: FLINK-16835
>                 URL: https://issues.apache.org/jira/browse/FLINK-16835
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Timo Walther
>            Priority: Major
>
> 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. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to