[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15889130#comment-15889130 ] ASF GitHub Bot commented on FLINK-5921: --- Github user fhueske closed the pull request at: https://github.com/apache/flink/pull/3425 > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15888737#comment-15888737 ] ASF GitHub Bot commented on FLINK-5921: --- Github user fhueske commented on the issue: https://github.com/apache/flink/pull/3425 Thanks for the feedback @sunjincheng121 and @twalthr Merging this. > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15888399#comment-15888399 ] ASF GitHub Bot commented on FLINK-5921: --- Github user twalthr commented on the issue: https://github.com/apache/flink/pull/3425 I'm fine with this temporary solution. +1 for merging until FLINK-5884 is fixed. > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887721#comment-15887721 ] ASF GitHub Bot commented on FLINK-5921: --- Github user sunjincheng121 commented on the issue: https://github.com/apache/flink/pull/3425 @fhueske Thanks for updating, the PR looks very good to me. I look forward to merge. Best, SunJincheng > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887684#comment-15887684 ] ASF GitHub Bot commented on FLINK-5921: --- Github user fhueske commented on the issue: https://github.com/apache/flink/pull/3425 Updated > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887551#comment-15887551 ] ASF GitHub Bot commented on FLINK-5921: --- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3425#discussion_r10335 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/FunctionGenerator.scala --- @@ -327,6 +329,15 @@ object FunctionGenerator { ) ) +// generate a constant for time indicator functions. +// this is a temporary solution and will be removed when FLINK-5884 is implemented. +case ProcTimeExtractor | EventTimeExtractor => + Some(new CallGenerator { +override def generate(codeGenerator: CodeGenerator, operands: Seq[GeneratedExpression]) = { + GeneratedExpression("0L", "false", "", LONG_TYPE_INFO) --- End diff -- Yes, thanks for the hint > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887417#comment-15887417 ] Haohui Mai commented on FLINK-5921: --- My understanding is that there should be no need for code generators as the indicators will be removed in the hep planner? > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887370#comment-15887370 ] ASF GitHub Bot commented on FLINK-5921: --- Github user sunjincheng121 commented on a diff in the pull request: https://github.com/apache/flink/pull/3425#discussion_r103384285 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/FunctionGenerator.scala --- @@ -327,6 +329,15 @@ object FunctionGenerator { ) ) +// generate a constant for time indicator functions. +// this is a temporary solution and will be removed when FLINK-5884 is implemented. +case ProcTimeExtractor | EventTimeExtractor => + Some(new CallGenerator { +override def generate(codeGenerator: CodeGenerator, operands: Seq[GeneratedExpression]) = { + GeneratedExpression("0L", "false", "", LONG_TYPE_INFO) --- End diff -- Can we change `LONG_TYPE_INFO` to `SqlTimeTypeInfo.TIMESTAMP`? > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-5921) Adapt time mode indicator functions return custom data types
[ https://issues.apache.org/jira/browse/FLINK-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15886575#comment-15886575 ] ASF GitHub Bot commented on FLINK-5921: --- GitHub user fhueske opened a pull request: https://github.com/apache/flink/pull/3425 [FLINK-5921] [table] Add custom data types for rowtime and proctime. We add a custom data type for the result of the `rowtime()` and `proctime()` marker functions to easier identify the chosen time semantics in when translating window operations. Both method return a constant timestamp (0L) which is injected during constant expression reduction. You can merge this pull request into a Git repository by running: $ git pull https://github.com/fhueske/flink tableTimeTypes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3425.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 #3425 commit 6cc819b88c408de7b42a968d2a8cdb21ab927ffd Author: Fabian HueskeDate: 2017-02-25T23:28:54Z [FLINK-5921] [table] Add custom data types for rowtime and proctime. - proctime() and rowtime() return constont timestamp (0L). > Adapt time mode indicator functions return custom data types > > > Key: FLINK-5921 > URL: https://issues.apache.org/jira/browse/FLINK-5921 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Affects Versions: 1.3.0 >Reporter: Fabian Hueske >Assignee: Fabian Hueske > > The functions that indicate event time ({{rowtime()}}) and processing time > ({{proctime()}}) are defined to return {{TIMESTAMP}}. > These functions should be updated to return custom types in order to ease the > identification of the time semantics during optimization. -- This message was sent by Atlassian JIRA (v6.3.15#6346)