Ramin Gharib created FLINK-39664:
------------------------------------

             Summary: Support ALTER MATERIALIZED TABLE ... SET FRESHNESS = ... 
conversion
                 Key: FLINK-39664
                 URL: https://issues.apache.org/jira/browse/FLINK-39664
             Project: Flink
          Issue Type: Sub-task
            Reporter: Ramin Gharib


Add {{{}SqlAlterMaterializedTableFreshnessConverter{}}}. Register it in 
{{{}SqlNodeConverters#registerMaterializedTableConverters{}}}.

*Behavior:*
 # Resolve the table.
 # Validate the new freshness interval using the same rules 
{{SqlCreateOrAlterMaterializedTableConverter}} applies on the create path.
 # Update the {{CatalogMaterializedTable}} freshness field and emit 
{{{}AlterMaterializedTableChangeOperation{}}}.
 # Consider whether the change requires the underlying refresh job to be 
restarted. If yes, document the requirement in the operation's summary and 
follow the same pattern used for {{AS QUERY}} changes.

*Tests:*
 * Valid freshness.
 * Invalid freshness types caught by {{IntervalLiteralOrError}} in the parser 
are already rejected; add a converter-level test that rejects negative or zero 
intervals.
 * IT case that changes freshness and asserts the catalog reflects it.

*Note:* FLIP-551 (FLINK-38532) makes freshness optional. The converter must 
accept the optional case and handle the transition from no-freshness to 
set-freshness as well as the reverse if grammar allows it.



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

Reply via email to