twalthr commented on code in PR #26923:
URL: https://github.com/apache/flink/pull/26923#discussion_r2307293382


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/ShowCreateUtil.java:
##########
@@ -263,10 +289,32 @@ static Optional<String> 
extractFormattedPartitionedInfo(ResolvedCatalogTable cat
         if (!catalogTable.isPartitioned()) {
             return Optional.empty();
         }
-        return Optional.of(
-                catalogTable.getPartitionKeys().stream()
-                        .map(EncodingUtils::escapeIdentifier)
-                        .collect(Collectors.joining(", ")));
+        return 
Optional.of(extractPartitionKeys(catalogTable.getPartitionKeys()));
+    }
+
+    static Optional<String> extractFormattedPartitionedInfo(
+            ResolvedCatalogMaterializedTable catalogMaterializedTable) {
+        if (!catalogMaterializedTable.isPartitioned()) {
+            return Optional.empty();
+        }
+        return 
Optional.of(extractPartitionKeys(catalogMaterializedTable.getPartitionKeys()));
+    }
+
+    private static String extractPartitionKeys(List<String> partitionKeys) {
+        return partitionKeys.stream()
+                .map(EncodingUtils::escapeIdentifier)
+                .collect(Collectors.joining(", "));
+    }
+
+    static String extractFreshness(ResolvedCatalogMaterializedTable 
materializedTable) {
+        final IntervalFreshness definitionFreshness = 
materializedTable.getDefinitionFreshness();
+        return String.format(
+                "FRESHNESS = INTERVAL '%s' %s",

Review Comment:
   Ok it seems the SQL parser allows parsing INTERVAL '5' DAY



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to