Ramin Gharib created FLINK-39606:
------------------------------------

             Summary:  Allow callers of 
ShowCreateUtil.buildShowCreateMaterializedTableRow to suppress FRESHNESS and 
REFRESH_MODE clauses
                 Key: FLINK-39606
                 URL: https://issues.apache.org/jira/browse/FLINK-39606
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / API
            Reporter: Ramin Gharib


{{ShowCreateUtil.buildShowCreateMaterializedTableRow}} always emits the 
{{FRESHNESS}} and {{REFRESH_MODE}} clauses when rendering {{SHOW CREATE 
MATERIALIZED TABLE}} output. For instance, if the FRESHNESS is globally 
configured to a fix value. Including these clauses in the output is misleading.
h3. Proposal

Add an overload of {{buildShowCreateMaterializedTableRow}} that accepts two 
flags:
 * {{boolean includeFreshness}}
 * {{boolean includeRefreshMode}}

The existing public overload delegates to the new one with {{{}true, true{}}}, 
preserving current behavior for all OSS callers. Callers that need to suppress 
either clause can opt in via the new overload.
h3. Scope
 * *File:* 
{{flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/ShowCreateUtil.java}}
 * No behavior change for existing callers.
 * Purely additive API.

h3. Test plan

Existing {{ShowCreateUtilTest}} covers the default-path overload (delegates 
with {{{}true, true{}}}) and continues to pass. A new test exercises the flag 
combinations to verify the clauses are suppressed/included as requested.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to