[
https://issues.apache.org/jira/browse/FLINK-5255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15734839#comment-15734839
]
Alexander Shoshin commented on FLINK-5255:
------------------------------------------
I found that we can have a {{LogicalProject}} followed by {{LogicalAggregate}}
in query like this:
{code}
SELECT bsum, a1
FROM tableA,
(SELECT sum(b1) + sum(b2) AS bsum
FROM tableB)
{code}
We also can have {{LogicalFilter}} followed by {{LogicalAggregate}} in query
like this:
{code}
SELECT bsum, a1
FROM tableA,
(SELECT sum(b1) AS bsum
FROM tableB
HAVING sum(b1) > 0)
{code}
Or both {{LogicalProject}} and {{LogicalFilter}} if we have "+" and HAVING.
[~fhueske], should we check all this conditions? And I can't reproduce a query
with {{LogicalCalc}} followed by {{LogicalAggregate}}.
> Improve single row check in DataSetSingleRowJoinRule
> ----------------------------------------------------
>
> Key: FLINK-5255
> URL: https://issues.apache.org/jira/browse/FLINK-5255
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Affects Versions: 1.2.0
> Reporter: Fabian Hueske
> Assignee: Alexander Shoshin
>
> {{DataSetSingleRowJoinRule}} checks converts an arbitrary inner join (cross,
> theta, equi) where one input has exactly one row into a broadcast-map join.
> Currently, the condition to check for the single row is that the input of the
> join must be a global aggregation. The check fails if the input is a
> {{LogicalCalc}} followed by {{LogicalAggregate}}.
> Hence, the following query cannot be executed:
> {code}
> SELECT absum, x.a
> FROM x, (SELECT a.sum + b.sum AS absum FROM y)
> {code}
> The single row check should be extended to accept a {{LogicalCalc}} that has
> no condition {{(RexProgram.getCondition() == null)}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)