flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiahui Jiang <qzhzm173...@hotmail.com>
Subject Preserve record orders after WINDOW function
Date Mon, 11 May 2020 15:17:04 GMT
Hello! I'm writing a SQL query with a OVER window function ordered by processing time.

I'm wondering since timestamp is only millisecond granularity.

For a query using over window and sorted on processing time column, for example,
```
SELECT col1,
     max(col2) OVER (PARTITION BY col1, ORDER BY _processing_time_column)
FROM table
```

If 2 records have the same processing timestamp (they arrived the operator at the exact same
millisecond), is the order guaranteed to be preserved after the window function? If not, what
would to the recommended workaround to keep the order?

Thank you!
Jiahui

Mime
View raw message