Rui Wang created BEAM-10198: ------------------------------- Summary: Program crashes for distinct bytes SQL query Key: BEAM-10198 URL: https://issues.apache.org/jira/browse/BEAM-10198 Project: Beam Issue Type: Bug Components: dsl-sql Reporter: Rui Wang Assignee: Rui Wang
{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 breaks Java code import. Need to diagnose the root cause and have a fix properly. -- This message was sent by Atlassian Jira (v8.3.4#803005)