From 46820483140946301cc4f13b353a94081b9b34d9 Mon Sep 17 00:00:00 2001 From: wenhuitang Date: Tue, 25 Dec 2018 20:16:27 +0800 Subject: [PATCH] [FLINK-11173][table] Fix the exception message of proctime attribute validation in TableSourceUtil#validateTableSource This closes #7374. --- .../org/apache/flink/table/sources/TableSourceUtil.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala index 5cb7e905f7644..dfab445d93004 100644 --- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala +++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala @@ -113,12 +113,12 @@ object TableSourceUtil { val rowtimeIdx = schema.getColumnNames.indexOf(rowtimeAttribute) // ensure that field exists if (rowtimeIdx < 0) { - throw ValidationException(s"Found a RowtimeAttributeDescriptor for field " + + throw new ValidationException(s"Found a rowtime attribute for field " + s"'$rowtimeAttribute' but field '$rowtimeAttribute' does not exist in table.") } // ensure that field is of type TIMESTAMP if (schema.getTypes(rowtimeIdx) != Types.SQL_TIMESTAMP) { - throw ValidationException(s"Found a RowtimeAttributeDescriptor for field " + + throw new ValidationException(s"Found a rowtime attribute for field " + s"'$rowtimeAttribute' but field '$rowtimeAttribute' is not of type TIMESTAMP.") } // look up extractor input fields in return type @@ -137,12 +137,12 @@ object TableSourceUtil { val proctimeIdx = schema.getColumnNames.indexOf(proctimeAttribute) // ensure that field exists if (proctimeIdx < 0) { - throw ValidationException(s"Found a RowtimeAttributeDescriptor for field " + + throw new ValidationException(s"Found a processing time attribute for field " + s"'$proctimeAttribute' but field '$proctimeAttribute' does not exist in table.") } // ensure that field is of type TIMESTAMP if (schema.getTypes(proctimeIdx) != Types.SQL_TIMESTAMP) { - throw ValidationException(s"Found a RowtimeAttributeDescriptor for field " + + throw new ValidationException(s"Found a processing time attribute for field " + s"'$proctimeAttribute' but field '$proctimeAttribute' is not of type TIMESTAMP.") } case _ => // nothing to validate