julianhyde/optiq — pull request #303 by vlsi (2014-06-20 21:08:04+00:00)
Title: Implement better resolution of window aggregate return types

Fixes https://issues.apache.org/jira/browse/OPTIQ-292

I did not touch the following code in `SqlToRelConverter`, however it might make sense to add proper type resolution here (with account of group count)

```java
private RexNode convertOver(Blackboard bb, SqlNode node) {
...
RexNode rexAgg = exprConverter.convertCall(bb, aggCall); // this does not take groupCount into the account
rexAgg =
rexBuilder.ensureType(
validator.getValidatedNodeType(call), rexAgg, false);
```