Steven Jacobs has submitted this change and it was merged.

Change subject: Fixed bug with pull-based channel
......................................................................


Fixed bug with pull-based channel

Change-Id: If758f9e8d5c66c5badd819ad877d269bee4408c8
---
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Xikui Wang: Looks good to me, approved; Verified



diff --git 
a/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
 
b/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
index 8e07af2..9a492d3 100644
--- 
a/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
+++ 
b/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
@@ -95,7 +95,14 @@
         eval2 = channelExecutionEvalFactory.createScalarEvaluator(ctx);
         this.entityId = activeJobId;
         this.push = push;
-        recordPrinterFactory = new ARecordPrinterFactory((ARecordType) 
recordType).createPrinter();
+        if (push) {
+            //for push-based channel, the recordType is the result record type 
(records are sent directly)
+            recordPrinterFactory = new ARecordPrinterFactory((ARecordType) 
recordType).createPrinter();
+        } else {
+            //for pull-based channels, the recordType is a list of 
subscription ids
+            //the subscriptionIdListPrinterFactory is used instead
+            recordPrinterFactory = null;
+        }
         subscriptionIdListPrinterFactory =
                 new AOrderedlistPrinterFactory(new 
AOrderedListType(BuiltinType.AUUID, null)).createPrinter();
         executionTimeString = null;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2876
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If758f9e8d5c66c5badd819ad877d269bee4408c8
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>

Reply via email to