You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "vinoyang (JIRA)" <ji...@apache.org> on 2018/12/17 05:00:00 UTC

[jira] [Created] (FLINK-11173) Proctime Attribute validation throws an incorrect exception message

vinoyang created FLINK-11173:
--------------------------------

             Summary: Proctime Attribute validation throws an incorrect exception message
                 Key: FLINK-11173
                 URL: https://issues.apache.org/jira/browse/FLINK-11173
             Project: Flink
          Issue Type: Bug
          Components: Table API &amp; SQL
            Reporter: vinoyang
            Assignee: TANG Wen-hui


In {{TableSourceUtil#}}validateTableSource, when uses {{DefinedProctimeAttribute}} (proctime), it throws an incorrect exception message : 

 
{code:java}
tableSource match {
  case p: DefinedProctimeAttribute if p.getProctimeAttribute != null =>
    val proctimeAttribute = p.getProctimeAttribute
    val proctimeIdx = schema.getFieldNames.indexOf(proctimeAttribute)
    // ensure that field exists
    if (proctimeIdx < 0) {
      throw new ValidationException(s"Found a RowtimeAttributeDescriptor for field " +
        s"'$proctimeAttribute' but field '$proctimeAttribute' does not exist in table.")
    }
    // ensure that field is of type TIMESTAMP
    if (schema.getFieldTypes()(proctimeIdx) != Types.SQL_TIMESTAMP) {
      throw new ValidationException(s"Found a RowtimeAttributeDescriptor for field " +
        s"'$proctimeAttribute' but field '$proctimeAttribute' is not of type TIMESTAMP.")
    }
  case _ => // nothing to validate
}

{code}
It still contains the keyword "RowtimeAttributeDescriptor".

{{}} 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)