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

Fix Timestamp field can not be selected in event time case when toDataStream[T], `T` not a `Row` Type.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.3.1, 1.4.0
    • Table SQL / API
    • None

    Description

      Currently for event-time window(group/over), When contain `Timestamp` type field in `SELECT Clause`, And toDataStream[T], `T` not a `Row` Type, Such `PojoType`, will throw a exception. In this JIRA. will fix this bug. For example:
      Group Window on SQL:

      SELECT name, max(num) as myMax, TUMBLE_START(rowtime, INTERVAL '5' SECOND) as winStart,TUMBLE_END(rowtime, INTERVAL '5' SECOND) as winEnd FROM T1 GROUP BY name, TUMBLE(rowtime, INTERVAL '5' SECOND)
      

      Throw Exception:

      org.apache.flink.table.api.TableException: The field types of physical and logical row types do not match.This is a bug and should not happen. Please file an issue.
      
      	at org.apache.flink.table.api.TableException$.apply(exceptions.scala:53)
      	at org.apache.flink.table.api.TableEnvironment.generateRowConverterFunction(TableEnvironment.scala:721)
      	at org.apache.flink.table.api.StreamTableEnvironment.getConversionMapper(StreamTableEnvironment.scala:247)
      	at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:647)
      

      In fact, when we solve this exception,subsequent other exceptions will be thrown. The real reason is TableEnvironment#generateRowConverterFunction method bug. So in this JIRA. will fix it.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sunjincheng121 sunjincheng
            sunjincheng121 sunjincheng
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment