apilloud commented on a change in pull request #15915:
URL: https://github.com/apache/beam/pull/15915#discussion_r746207788



##########
File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCalcRel.java
##########
@@ -256,18 +283,24 @@ public void setup() {
     }
 
     @ProcessElement
-    public void processElement(@FieldAccess("row") Row row, 
OutputReceiver<Row> r) {
+    public void processElement(@FieldAccess("row") Row row, 
MultiOutputReceiver r) {
       assert se != null;
-      final Object[] v;
       try {
-        v = (Object[]) se.evaluate(new Object[] {row, CONTEXT_INSTANCE});
+        Object[] v = (Object[]) se.evaluate(new Object[] {row, 
CONTEXT_INSTANCE});
+        if (v != null) {
+          final Row output = toBeamRow(Arrays.asList(v), outputSchema, 
verifyRowValues);
+          r.get(rows).output(output);

Review comment:
       nit: This is a somewhat performance sensitive path, the extra `get` 
might slow things down. Is it possible to use `OutputReciever<Row>` for this 
case still?




-- 
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]


Reply via email to