You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/12 00:22:31 UTC

[GitHub] [beam] tvalentyn commented on a change in pull request #12263: [BEAM-10492] Add missing sideinput handling to DLP transforms

tvalentyn commented on a change in pull request #12263:
URL: https://github.com/apache/beam/pull/12263#discussion_r468935806



##########
File path: sdks/java/extensions/ml/src/main/java/org/apache/beam/sdk/extensions/ml/DLPDeidentifyText.java
##########
@@ -177,19 +177,24 @@ public DLPDeidentifyText build() {
   @Override
   public PCollection<KV<String, DeidentifyContentResponse>> expand(
       PCollection<KV<String, String>> input) {
-    return input
-        .apply(ParDo.of(new MapStringToDlpRow(getColumnDelimiter())))
-        .apply("Batch Contents", ParDo.of(new BatchRequestForDLP(getBatchSizeBytes())))
-        .apply(
-            "DLPDeidentify",
+
+    ParDo.SingleOutput<KV<String, Iterable<Table.Row>>, KV<String, DeidentifyContentResponse>>
+        deidentifyParDo =
             ParDo.of(
                 new DeidentifyText(
                     getProjectId(),
                     getInspectTemplateName(),
                     getDeidentifyTemplateName(),
                     getInspectConfig(),
                     getDeidentifyConfig(),
-                    getHeaderColumns())));
+                    getHeaderColumns()));
+    if (getHeaderColumns() != null) {

Review comment:
       Thanks, merging for now so that we don't have to cherry-pick this into 2.24.0 and we have manually verified the fix on 2.23.0. 
   




----------------------------------------------------------------
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:
users@infra.apache.org