robertwb commented on code in PR #29889:
URL: https://github.com/apache/beam/pull/29889#discussion_r1454188924
##########
sdks/typescript/src/apache_beam/pvalue.ts:
##########
@@ -99,7 +99,7 @@ export class PCollection<T> {
}
applyAsync<OutputT extends PValue<any>>(
- transform: AsyncPTransform<PCollection<T>, OutputT>,
+ transform: AsyncPTransform<PCollection<any>, OutputT>,
Review Comment:
Same.
##########
sdks/typescript/src/apache_beam/pvalue.ts:
##########
@@ -90,7 +90,7 @@ export class PCollection<T> {
}
apply<OutputT extends PValue<any>>(
- transform: PTransform<PCollection<T>, OutputT>,
+ transform: PTransform<PCollection<any>, OutputT>,
Review Comment:
We only should accept applying `PCollection<T>`s here (to a
`PCollection<T>`).
##########
sdks/typescript/src/apache_beam/transforms/group_and_combine.ts:
##########
@@ -69,7 +69,7 @@ type Combiner<I> = CombineFn<I, any, any> | ((a: any, b: any)
=> any);
*/
export class GroupBy<T, K> extends PTransformClass<
PCollection<T>,
- PCollection<KV<K, Iterable<T>>>
+ PCollection<KV<K, T[]>>
Review Comment:
Does `T[]` not satisfy `Iterable<T>`? I don't think we want to promise an
array, as we may want to give other iterables in the future. (This is important
to support values sets that do not fit into memory.)
##########
sdks/typescript/test/wordcount.ts:
##########
@@ -24,7 +24,10 @@ import { PortableRunner } from
"../src/apache_beam/runners/portable_runner/runne
function wordCount(
lines: beam.PCollection<string>
-): beam.PCollection<beam.KV<string, number>> {
+): beam.PCollection<{
+ element: any;
Review Comment:
Why was the type loosened here?
--
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]