leiyiz commented on a change in pull request #12427:
URL: https://github.com/apache/beam/pull/12427#discussion_r464037245



##########
File path: 
sdks/python/apache_beam/testing/benchmarks/nexmark/models/nexmark_model.py
##########
@@ -26,31 +26,55 @@
   - The bid on an item for auction (Bid).
 
 """
+from apache_beam.coders import coder_impl
+from apache_beam.coders.coders import FastCoder
+from apache_beam.coders.coders import StrUtf8Coder
+from apache_beam.testing.benchmarks.nexmark import nexmark_util
+
+
+class PersonCoder(FastCoder):
+  def _create_impl(self):
+    return PersonCoderImpl()
+
+  def is_deterministic(self):
+    # type: () -> bool
+    return True
 
 
 class Person(object):
   "Author of an auction or a bid."
+  CODER = PersonCoder()
 
   def __init__(
-      self, id, name, email, credit_card, city, state, timestamp, extra=None):
+      self, id, name, email, credit_card, city, state, date_time, extra=None):
     self.id = id
     self.name = name
-    self.email = email  # key
+    self.email_address = email  # key
     self.credit_card = credit_card
     self.city = city
     self.state = state
-    self.timestamp = timestamp
+    self.date_time = date_time
     self.extra = extra
 
   def __repr__(self):
-    return 'Person({id}, {email})'.format(
-        **{
-            'id': self.id, 'email': self.email
-        })
+    return nexmark_util.model_to_json(self)
+
+
+class AuctionCoder(FastCoder):
+  def to_type_hint(self):

Review comment:
       my bad it is a mistake..




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to