Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11173

Proctime attribute validation throws an incorrect exception message

    XMLWordPrintableJSON

    Details

      Description

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

       

      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
      }
      
      

      It still contains the keyword "RowtimeAttributeDescriptor".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                winipanda TANG Wen-hui
                Reporter:
                yanghua vinoyang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m