TheNeuralBit commented on a change in pull request #12076:
URL: https://github.com/apache/beam/pull/12076#discussion_r445091826



##########
File path: sdks/python/apache_beam/transforms/sql_test.py
##########
@@ -157,6 +157,21 @@ def test_zetasql_generate_data(self):
           dialect="zetasql")
       assert_that(out, equal_to([(1, "foo", 3.14)]))
 
+  def test_windowing_before_sql(self):
+    with TestPipeline() as p:
+      windowed = (
+          p | beam.Create([
+              SimpleRow(5, "foo", 1.),
+              SimpleRow(15, "bar", 2.),
+              SimpleRow(25, "baz", 3.)
+          ])
+          | beam.Map(lambda v: beam.window.TimestampedValue(v, v.id)).
+          with_output_types(SimpleRow)

Review comment:
       @udim I'm curious if you have any suggestions for a better way to create 
a PCollection with timestamps that also has an output type annotation (in this 
case it's required for Beam schemas).
   
   This way is confusing since there's a mismatch between the return value of 
the function and the type in `with_output_types`




----------------------------------------------------------------
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:
[email protected]


Reply via email to