[ 
https://issues.apache.org/jira/browse/BEAM-6401?focusedWorklogId=218882&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-218882
 ]

ASF GitHub Bot logged work on BEAM-6401:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/19 19:30
            Start Date: 26/Mar/19 19:30
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on issue #8142: [BEAM-6401] Upgrade 
to Calcite 1.19
URL: https://github.com/apache/beam/pull/8142#issuecomment-476812074
 
 
   R: @kanterov 
   cc: @kennknowles @akedin @xumingming @XuMingmin 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 218882)
    Time Spent: 20m  (was: 10m)

> NullPointerException and regression in BeamCalcRel
> --------------------------------------------------
>
>                 Key: BEAM-6401
>                 URL: https://issues.apache.org/jira/browse/BEAM-6401
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: Gleb Kanterov
>            Assignee: Andrew Pilloud
>            Priority: Major
>              Labels: triaged
>             Fix For: 2.12.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Test case to reproduce:
> {code}
>     Schema schema =
>         Schema.builder()
>             .addNullableField("f0", Schema.FieldType.BOOLEAN)
>             .build();
>     String sql =
>         "SELECT SUM(case when coalesce(f0, true) = true then 1 else 0 end) " +
>         "FROM PCOLLECTION";
>     List<Row> rows = ImmutableList.of(
>         Row.withSchema(schema).addValue(false).build(),
>         Row.withSchema(schema).addValue(true).build(),
>         Row.withSchema(schema).addValue(null).build());
>     PCollection<Row> input = pipeline.apply("rows", 
> Create.of(rows).withRowSchema(schema));
>     
> PAssert.that(input.apply(SqlTransform.query(sql))).satisfies(matchesScalar(2));
>     pipeline.run();
> {code}
> Similar test case doesn't throw NPE, but fails:
> {code}
>     Schema schema =
>         Schema.builder()
>             .addNullableField("f0", Schema.FieldType.BOOLEAN)
>             .build();
>     String sql =
>         "SELECT SUM(case when coalesce(f0, false) = true then 1 else 0 end) " 
> +
>         "FROM PCOLLECTION";
>     List<Row> rows = ImmutableList.of(
>         Row.withSchema(schema).addValue(false).build(),
>         Row.withSchema(schema).addValue(true).build(),
>         Row.withSchema(schema).addValue(null).build());
>     PCollection<Row> input = pipeline.apply("rows", 
> Create.of(rows).withRowSchema(schema));
>     
> PAssert.that(input.apply(SqlTransform.query(sql))).satisfies(matchesScalar(1));
>     pipeline.run();
> {code}



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

Reply via email to