apilloud commented on a change in pull request #13759:
URL: https://github.com/apache/beam/pull/13759#discussion_r565652412



##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/BeamZetaSqlCalcRel.java
##########
@@ -191,27 +212,95 @@ public void setup() {
       stream = exp.stream();
     }
 
+    @StartBundle
+    public void startBundle() {
+      pending = new HashMap<>();
+      previousRow = null;
+      previousFuture = null;
+    }
+
+    @Override
+    public Duration getAllowedTimestampSkew() {
+      return Duration.millis(Long.MAX_VALUE);
+    }
+
     @ProcessElement
-    public void processElement(ProcessContext c) throws InterruptedException {
-      Map<String, Value> columns = new HashMap<>();
-      Row row = c.element();
-      for (int i : referencedColumns) {
-        columns.put(
-            columnName(i),
-            ZetaSqlBeamTranslationUtils.toZetaSqlValue(
-                row.getBaseValue(i, Object.class), 
inputSchema.getField(i).getType()));
+    public void processElement(
+        @Element Row row, @Timestamp Instant t, BoundedWindow w, 
OutputReceiver<Row> r)
+        throws InterruptedException {
+      final Future<Value> vf;
+
+      if (row.equals(previousRow)) {

Review comment:
       Yes it does: 
https://github.com/apache/beam/blob/3bb232fb098700de408f574585dfe74bbaff7230/sdks/java/core/src/main/java/org/apache/beam/sdk/values/Row.java#L428




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