flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink issue #3993: [FLINK-6725][table] make requiresOver as a contracted met...
Date Sun, 28 May 2017 12:50:06 GMT
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/3993
  
    Hi @shaoxuan-wang and @sunjincheng121,
    
    Ad 2) I think it is OK to have this as a method with a default implementation. If we choose
the contract function design, we have the same default behavior as the default implementation
if the method is not implemented, so IMO there is not really a difference. Due to the default
implementation, a user does not need to implement the method unless it is necessary. However
in that case, it can be overridden in a safe way with IDE support. A contract function, does
not offer this safety because a user needs to lookup the exact signature in the documentation.
    Ad 3) I think it would indeed make sense to add `getAccumulatorType()` and `getResultType()`
to `AggregateFunction` and return `null` by default. This would also be more consistent with
`ScalarFunction` and `TableFunction`. This would also help with type and compile safety, because
we can enforce the type of the returned `TypeInformation` as `T` and `ACC` without going through
reflection magic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message