erenavsarogullari commented on a change in pull request #3109: Add withStream()
in Streamlet to support stream selection
URL: https://github.com/apache/incubator-heron/pull/3109#discussion_r235561112
##########
File path:
heron/api/tests/scala/org/apache/heron/streamlet/scala/impl/StreamletImplTest.scala
##########
@@ -245,6 +246,62 @@ class StreamletImplTest extends BaseFunSuite {
verifySupplierStreamlet(supplierStreamlet2)
}
+ test("StreamletImpl should support split and withStream transformation") {
+ val supplierStreamlet = builder
+ .newSource(() => Math.random)
+ .setName("Supplier_Streamlet_1")
+ .setNumPartitions(20)
+
+ val splitted = supplierStreamlet
Review comment:
Wondering what is the behaviour if transformation is set without selecting
`streamId` after `split` function as follows?
```
supplierStreamlet
.split(Map(
"position" -> { num: Double => num > 0 },
"negative" -> { num: Double => num < 0 }
))
.setName("Split_Streamlet_1")
.setNumPartitions(5)
.map() // without selecting streamId
```
Also, UT coverage can be useful for this case
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services