Skip to content

Commit 7ee239e

Browse files
Copilotjoocer
andcommitted
Enable AT/BEFORE timestamp versioning syntax in OpteryxDialect
Add supports_timestamp_versioning() returning true to enable: - AT(TIMESTAMP => '...') syntax (Snowflake-style) - BEFORE(TIMESTAMP => '...') syntax - FOR SYSTEM_TIME AS OF '...' syntax (SQL:2011 standard) This allows the parser to recognize these time-travel syntaxes even though Opteryx doesn't use them yet. Co-authored-by: joocer <1688479+joocer@users.noreply.github.com>
1 parent 7abe4a0 commit 7ee239e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/opteryx_dialect.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,13 @@ impl Dialect for OpteryxDialect {
126126
true
127127
}
128128

129+
/// Returns true if the dialect supports timestamp versioning for time-travel queries.
130+
/// This enables syntax like:
131+
/// - `SELECT * FROM table AT(TIMESTAMP => '2024-12-15 00:00:00')`
132+
/// - `SELECT * FROM table BEFORE(TIMESTAMP => '2024-12-15 00:00:00')`
133+
/// - `SELECT * FROM table FOR SYSTEM_TIME AS OF '2024-12-15 00:00:00'`
134+
fn supports_timestamp_versioning(&self) -> bool {
135+
true
136+
}
137+
129138
}

0 commit comments

Comments
 (0)