[ 
https://issues.apache.org/jira/browse/FLINK-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045969#comment-16045969
 ] 

ASF GitHub Bot commented on FLINK-6886:
---------------------------------------

GitHub user sunjincheng121 opened a pull request:

    https://github.com/apache/flink/pull/4102

    [FLINK-6886][table]Fix Timestamp field can not be selected in event t…

    In this JIRA. will fix the exception when we run the folllows 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)`
    Exception Info:
    ```
    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)
    ```
    - [x] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the 
JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [x] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sunjincheng121/flink FLINK-6886

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4102.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4102
    
----
commit 3c89d1c8576ec44245ecb381be2ef35f5479c149
Author: sunjincheng121 <sunjincheng...@gmail.com>
Date:   2017-06-11T05:53:15Z

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

----


> Fix Timestamp field can not be selected in event time case when  
> toDataStream[T], `T` not a `Row` Type.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-6886
>                 URL: https://issues.apache.org/jira/browse/FLINK-6886
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.4.0
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> 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:
> {code}
> 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)
> {code}
> Throw Exception:
> {code}
> 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)
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to