[ 
https://issues.apache.org/jira/browse/FLINK-18701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-18701:
-----------------------------------
    Labels: auto-unassigned stale-major  (was: auto-unassigned)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Major but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 30 days. I have gone ahead and added a "stale-major" to the issue". If this 
ticket is a Major, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> NOT NULL constraint is not guaranteed when aggregation split is enabled
> -----------------------------------------------------------------------
>
>                 Key: FLINK-18701
>                 URL: https://issues.apache.org/jira/browse/FLINK-18701
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.11.1
>            Reporter: Jark Wu
>            Priority: Major
>              Labels: auto-unassigned, stale-major
>
> Take the following test: 
> {{org.apache.flink.table.planner.runtime.stream.sql.SplitAggregateITCase#testMinMaxWithRetraction}}
> {code:scala}
>     val t1 = tEnv.sqlQuery(
>       s"""
>          |SELECT
>          |  c, MIN(b), MAX(b), COUNT(DISTINCT a)
>          |FROM(
>          |  SELECT
>          |    a, COUNT(DISTINCT b) as b, MAX(b) as c
>          |  FROM T
>          |  GROUP BY a
>          |) GROUP BY c
>        """.stripMargin)
>     val sink = new TestingRetractSink
>     t1.toRetractStream[Row].addSink(sink)
>     env.execute()
>     println(sink.getRawResults)
> {code}
> The query schema is
> {code:java}
> root
>  |-- c: INT
>  |-- EXPR$1: BIGINT NOT NULL
>  |-- EXPR$2: BIGINT NOT NULL
>  |-- EXPR$3: BIGINT NOT NULL
> {code}
> This should be correct as the count is never null and thus min/max are never 
> null, however, we can receive null in the sink.
> {code}
> List((true,1,null,null,1), (true,2,2,2,1), (false,1,null,null,1), 
> (true,6,2,2,1), (true,5,1,1,0), (false,5,1,1,0), (true,5,1,1,2), 
> (true,4,2,2,0), (false,5,1,1,2), (true,5,1,3,2), (false,4,2,2,0), 
> (false,5,1,3,2), (true,5,1,4,2))
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to