gabrywu commented on issue #27733:
URL: https://github.com/apache/beam/issues/27733#issuecomment-1657390224
```java
Pipeline pipeline =
Pipeline.create(PipelineOptionsFactory.fromArgs("--runner=FlinkRunner"
, "--fasterCopy=true"
, "--disableMetrics=true"
, "--externalizedCheckpointsEnabled=false").create());
Schema schema = Schema.builder()
.addInt64Field("id")
.addArrayField("arr", Schema.FieldType.STRING)
.build();
Row row = Row.withSchema(schema)
.addValue(System.currentTimeMillis())
.addValue(Arrays.asList("a","b","c"))
.build();
PCollection<Row> output = pipeline.apply(Create.of(row))
.setRowSchema(schema)
.apply("filter",
SqlTransform.query("SELECT * FROM PCOLLECTION a " +
" cross join" +
" UNNEST (a.arr) AS t(str)" +
" where str <> 'a'"));
PAssert.that(output).satisfies(new SimpleFunction<Iterable<Row>,
Void>() {
@Override
public Void apply(Iterable<Row> input) {
for (Row row : input) {
Assert.assertNotEquals("a", row.getString("str"));
}
return null;
}
});
pipeline.run().waitUntilFinish();
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]