Fix a typo in a comment.

This commit is contained in:
Patrick Cloke 2022-02-16 06:53:21 -05:00
parent 130fd45393
commit 7a92d68441

View File

@ -489,7 +489,7 @@ class RelationsWorkerStore(SQLBaseStore):
# TODO Should this only allow m.room.message events. # TODO Should this only allow m.room.message events.
if isinstance(self.database_engine, PostgresEngine): if isinstance(self.database_engine, PostgresEngine):
# The `DISTINCT ON` clause will pick the *first* row it encounters, # The `DISTINCT ON` clause will pick the *first* row it encounters,
# so ordering by topologica ordering + stream ordering desc will # so ordering by topological ordering + stream ordering desc will
# ensure we get the latest event in the thread. # ensure we get the latest event in the thread.
sql = """ sql = """
SELECT DISTINCT ON (parent.event_id) parent.event_id, child.event_id FROM events AS child SELECT DISTINCT ON (parent.event_id) parent.event_id, child.event_id FROM events AS child