matriv commented on a change in pull request #18058: URL: https://github.com/apache/flink/pull/18058#discussion_r772583717
########## File path: flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/connector/elasticsearch/table/IndexGeneratorFactory.java ########## @@ -88,6 +89,21 @@ private static IndexGenerator createRuntimeIndexGenerator( index.substring(indexPrefix.length() + dynamicIndexPatternStr.length()); final boolean isDynamicIndexWithFormat = indexHelper.checkIsDynamicIndexWithFormat(index); + final boolean isDynamicIndexWithProcTimeFormat = + indexHelper.checkIsDynamicIndexWithProcTimeFormat(index); + + if (isDynamicIndexWithProcTimeFormat) { + final String dateTimeFormat = + indexHelper.extractDateFormat( + index, LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE); + return new AbstractTimeIndexGenerator(index, dateTimeFormat) { + @Override + public String generate(RowData row) { + return indexPrefix.concat(LocalDateTime.now().format(dateTimeFormatter)); Review comment: Sorry, I forgot to reply here, but yep, what you did with the timezone from the table config is good! -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org