flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6886) Fix Timestamp field can not be selected in event time case when toDataStream[T], `T` not a `Row` Type.
Date Tue, 13 Jun 2017 14:27:00 GMT

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

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

Github user wuchong commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4102#discussion_r121694007
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
---
    @@ -715,15 +715,8 @@ abstract class TableEnvironment(val config: TableConfig) {
           functionName: String):
         GeneratedFunction[MapFunction[Row, OUT], OUT] = {
     
    -    // validate that at least the field types of physical and logical type match
    -    // we do that here to make sure that plan translation was correct
    -    if (schema.physicalTypeInfo != inputTypeInfo) {
    -      throw 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.")
    -    }
    -
    -    val fieldTypes = schema.physicalFieldTypeInfo
    -    val fieldNames = schema.physicalFieldNames
    +    val fieldTypes = schema.logicalFieldTypeInfo
    +    val fieldNames = schema.logicalFieldNames
    --- End diff --
    
    I'm not sure about this change. The physical and logical type check is to make sure all
the time indicators are translated. 



> 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.4.14#64029)

Mime
View raw message