You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Gleb Kanterov (JIRA)" <ji...@apache.org> on 2018/08/01 08:59:00 UTC

[jira] [Commented] (BEAM-5056) [SQL] Nullability of aggregation expressions isn't inferred properly

    [ https://issues.apache.org/jira/browse/BEAM-5056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565011#comment-16565011 ] 

Gleb Kanterov commented on BEAM-5056:
-------------------------------------

I think I have a fix for this issue, problem is in  `BeamAggregationTransforms`

> [SQL] Nullability of aggregation expressions isn't inferred properly
> --------------------------------------------------------------------
>
>                 Key: BEAM-5056
>                 URL: https://issues.apache.org/jira/browse/BEAM-5056
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: Gleb Kanterov
>            Assignee: Xu Mingmin
>            Priority: Major
>
> Given schema and rows:
> {code:java}
> Schema schema =
>     Schema.builder()
>         .addNullableField("f_int1", Schema.FieldType.INT32)
>         .addNullableField("f_int2", Schema.FieldType.INT32)
>         .build();
> List<Row> rows =
>     TestUtils.RowsBuilder.of(schema)
>         .addRows(null, null)
>         .getRows();
> {code}
> Following query fails:
> {code:sql}
> SELECT AVG(f_int1) FROM PCOLLECTION GROUP BY f_int2
> {code}
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Field EXPR$0 is not nullable{code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)