This is an automated email from the ASF dual-hosted git repository.
yichi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 95b109636b2 Add a type hint to nexmark query 3 joinFn (#21873)
95b109636b2 is described below
commit 95b109636b2b96f8ed5f113d41ea938942a05338
Author: Yichi Zhang <[email protected]>
AuthorDate: Wed Jun 15 17:16:41 2022 -0700
Add a type hint to nexmark query 3 joinFn (#21873)
---
.../apache_beam/testing/benchmarks/nexmark/queries/query3.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/sdks/python/apache_beam/testing/benchmarks/nexmark/queries/query3.py
b/sdks/python/apache_beam/testing/benchmarks/nexmark/queries/query3.py
index 2ddb25d00d5..eb16d2dc36a 100644
--- a/sdks/python/apache_beam/testing/benchmarks/nexmark/queries/query3.py
+++ b/sdks/python/apache_beam/testing/benchmarks/nexmark/queries/query3.py
@@ -32,6 +32,7 @@ the stored person record.
"""
import logging
+import typing
import apache_beam as beam
from apache_beam.testing.benchmarks.nexmark.models import nexmark_model
@@ -107,9 +108,13 @@ class JoinFn(beam.DoFn):
def __init__(self, max_auction_wait_time):
self.max_auction_wait_time = max_auction_wait_time
- def process(
+ def process( # type: ignore
self,
- element,
+ element: typing.Tuple[
+ str,
+ typing.Dict[str,
+ typing.Union[typing.List[nexmark_model.Auction],
+ typing.List[nexmark_model.Person]]]],
auction_state=beam.DoFn.StateParam(auction_spec),
person_state=beam.DoFn.StateParam(person_spec),
person_timer=beam.DoFn.TimerParam(person_timer_spec)):