This is an automated email from the ASF dual-hosted git repository. twalthr pushed a commit to branch release-1.14 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.14 by this push: new a73d1b2 [hotfix][connectors][docs] Use big M letters for month in date format a73d1b2 is described below commit a73d1b2d5a06c209cc87574862b3278b00f350f3 Author: Sergey Nuyanzin <snuyan...@gmail.com> AuthorDate: Mon Dec 20 18:01:49 2021 +0100 [hotfix][connectors][docs] Use big M letters for month in date format --- docs/content.zh/docs/connectors/table/filesystem.md | 2 +- docs/content/docs/connectors/table/filesystem.md | 2 +- .../apache/flink/table/planner/expressions/TemporalTypesTest.scala | 6 +++--- .../apache/flink/table/filesystem/FileSystemConnectorOptions.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content.zh/docs/connectors/table/filesystem.md b/docs/content.zh/docs/connectors/table/filesystem.md index de9438f..4efcc89 100644 --- a/docs/content.zh/docs/connectors/table/filesystem.md +++ b/docs/content.zh/docs/connectors/table/filesystem.md @@ -280,7 +280,7 @@ file sink 支持文件合并,以允许应用程序可以使用较小的检查 <td><h5>partition.time-extractor.timestamp-pattern</h5></td> <td style="word-wrap: break-word;">(none)</td> <td>String</td> - <td> 'default' 时间提取器允许用户从分区字段中提取合法的时间戳模式。默认支持从第一个字段按 'yyyy-mm-dd hh:mm:ss' 时间戳模式提取。 + <td> 'default' 时间提取器允许用户从分区字段中提取合法的时间戳模式。默认支持从第一个字段按 'yyyy-MM-dd hh:mm:ss' 时间戳模式提取。 如果需要从一个分区字段比如 ‘dt’ 提取时间戳,可以配置为: '$dt'; 如果需要从多个分区字段,比如 'year', 'month', 'day' 和 'hour'提取时间戳,可以配置为:'$year-$month-$day $hour:00:00'; 如果需要从两字分区字段,比如 'dt' 和 'hour' 提取时间戳,可以配置为:'$dt $hour:00:00'.</td> diff --git a/docs/content/docs/connectors/table/filesystem.md b/docs/content/docs/connectors/table/filesystem.md index 7f143b3..3f2b455 100644 --- a/docs/content/docs/connectors/table/filesystem.md +++ b/docs/content/docs/connectors/table/filesystem.md @@ -297,7 +297,7 @@ Time extractors define extracting time from partition values. <td><h5>partition.time-extractor.timestamp-pattern</h5></td> <td style="word-wrap: break-word;">(none)</td> <td>String</td> - <td>The 'default' construction way allows users to use partition fields to get a legal timestamp pattern. Default support 'yyyy-mm-dd hh:mm:ss' from first field. If timestamp should be extracted from a single partition field 'dt', can configure: '$dt'. If timestamp should be extracted from multiple partition fields, say 'year', 'month', 'day' and 'hour', can configure: '$year-$month-$day $hour:00:00'. If timestamp should be extracted from two partition fields 'dt' and 'hour', can [...] + <td>The 'default' construction way allows users to use partition fields to get a legal timestamp pattern. Default support 'yyyy-MM-dd hh:mm:ss' from first field. If timestamp should be extracted from a single partition field 'dt', can configure: '$dt'. If timestamp should be extracted from multiple partition fields, say 'year', 'month', 'day' and 'hour', can configure: '$year-$month-$day $hour:00:00'. If timestamp should be extracted from two partition fields 'dt' and 'hour', can [...] </tr> </tbody> </table> diff --git a/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala b/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala index 70bd5ca..6cc9d6f 100644 --- a/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala +++ b/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala @@ -737,7 +737,7 @@ class TemporalTypesTest extends ExpressionTestBase { ) testSqlApi( - "TO_TIMESTAMP(f14, 'yyyy-mm-dd')", + "TO_TIMESTAMP(f14, 'yyyy-MM-dd')", "null" ) } @@ -1002,7 +1002,7 @@ class TemporalTypesTest extends ExpressionTestBase { def testInvalidInputCase(): Unit = { val invalidStr = "invalid value" testSqlApi(s"DATE_FORMAT('$invalidStr', 'yyyy/MM/dd HH:mm:ss')", nullable) - testSqlApi(s"TO_TIMESTAMP('$invalidStr', 'yyyy-mm-dd')", nullable) + testSqlApi(s"TO_TIMESTAMP('$invalidStr', 'yyyy-MM-dd')", nullable) testSqlApi(s"TO_DATE('$invalidStr')", nullable) testSqlApi( s"CONVERT_TZ('$invalidStr', 'UTC', 'Asia/Shanghai')", @@ -1014,7 +1014,7 @@ class TemporalTypesTest extends ExpressionTestBase { val invalidStr = "invalid value" val cases = Seq( s"DATE_FORMAT('$invalidStr', 'yyyy/MM/dd HH:mm:ss')", - s"TO_TIMESTAMP('$invalidStr', 'yyyy-mm-dd')", + s"TO_TIMESTAMP('$invalidStr', 'yyyy-MM-dd')", s"TO_DATE('$invalidStr')", s"CONVERT_TZ('$invalidStr', 'UTC', 'Asia/Shanghai')") diff --git a/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/FileSystemConnectorOptions.java b/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/FileSystemConnectorOptions.java index 42a40ca..e595867 100644 --- a/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/FileSystemConnectorOptions.java +++ b/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/FileSystemConnectorOptions.java @@ -167,7 +167,7 @@ public class FileSystemConnectorOptions { + "you can specify a pattern to get a timestamp from partitions.") .list( text( - "By default, a format of 'yyyy-mm-dd hh:mm:ss' is read from the first field."), + "By default, a format of 'yyyy-MM-dd hh:mm:ss' is read from the first field."), text( "If the timestamp in the partition is a single field called 'dt', you can use '$dt'."), text(