StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.3k stars 1.68k forks source link

Support for AS OF joins #22511

Open kzk2000 opened 1 year ago

kzk2000 commented 1 year ago

Feature request

Please support AS OF JOIN, similar to what kdb, QuestDB, and ClickHouse already offer. It’s a critical feature for financial use cases such as matching trades & quotes, for instance, or IoT use cases where different time-series streams don’t have matching time stamps.

Describe the solution you'd like I don’t know what AS OF join implementation works best. QuestDb code is Apache v2 open-source, so that might be a good start.

Alternatively, I found this pure Postgres SQL solution that was posted on a TimeScaleDB thread that might be a good starting point as well: https://github.com/timescale/timescaledb/issues/271#issuecomment-1324774018

Additional context Per this thread on Starrocks Slack, this feature has been requested by others before as well: https://starrocks.slack.com/archives/C02FACZSNJV/p1682199052128039

kzk2000 commented 11 months ago

here are a few references for DBs that support this:

github-actions[bot] commented 4 months ago

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

kzk2000 commented 4 months ago

Please keep it active, still waiting for this to compare Starrocks vs Clickhouse

kzk2000 commented 1 month ago

Snowflake added AS OF JOINS too by now: https://docs.snowflake.com/en/sql-reference/constructs/asof-join