You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2020/08/09 17:07:01 UTC

[jira] [Commented] (BEAM-10226) BeamSQL might fail on test_distinct_bytes after migrated to Sets transform

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

Beam JIRA Bot commented on BEAM-10226:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.


> BeamSQL might fail on test_distinct_bytes after migrated to Sets transform
> --------------------------------------------------------------------------
>
>                 Key: BEAM-10226
>                 URL: https://issues.apache.org/jira/browse/BEAM-10226
>             Project: Beam
>          Issue Type: Task
>          Components: sdk-java-core
>            Reporter: Rui Wang
>            Priority: P2
>              Labels: stale-P2
>
> This query breaks Java code import. Need to diagnose the root cause and have a fix properly. 
> {code:java}
>  public void test_distinct_bytes() {
>     String sql = "SELECT DISTINCT val.BYTES\n"
>         + "from (select b\"1\" BYTES union all\n"
>         + "      select cast(NULL as bytes) union all\n"
>         + "      select b\"-1\" union all\n"
>         + "      select b\"1\" union all\n"
>         + "      select cast(NULL as bytes)) val";
>     ZetaSQLQueryPlanner zetaSQLQueryPlanner = new ZetaSQLQueryPlanner(config);
>     BeamRelNode beamRelNode = zetaSQLQueryPlanner.convertToBeamRel(sql);
>     PCollection<Row> stream = BeamSqlRelUtils.toPCollection(pipeline, beamRelNode);
>     Schema singleField = Schema.builder().addByteArrayField("field1").build();
>     PAssert.that(stream)
>         .containsInAnyOrder(
>             Row.withSchema(singleField).addValues("123".getBytes(UTF_8)).build());
>     pipeline.run().waitUntilFinish(Duration.standardMinutes(PIPELINE_EXECUTION_WAITTIME_MINUTES));
>   }
> {code}
> This query will throws 
> {code:java}
> Forbidden IOException when reading from InputStream
> java.lang.IllegalArgumentException: Forbidden IOException when reading from InputStream
> 	at org.apache.beam.sdk.util.CoderUtils.decodeFromSafeStream(CoderUtils.java:118)
> 	at org.apache.beam.sdk.util.CoderUtils.decodeFromByteArray(CoderUtils.java:98)
> 	at org.apache.beam.sdk.util.CoderUtils.decodeFromByteArray(CoderUtils.java:92)
> 	at org.apache.beam.sdk.util.CoderUtils.clone(CoderUtils.java:141)
> {code}



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