Skip to content

Commit ea2acf5

Browse files
committed
refactor table versioning support flag
because now we can version by more than just timestamps
1 parent 5910353 commit ea2acf5

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/dialect/bigquery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl Dialect for BigQueryDialect {
136136
}
137137

138138
// See <https://cloud.google.com/bigquery/docs/access-historical-data>
139-
fn supports_timestamp_versioning(&self) -> bool {
139+
fn supports_table_versioning(&self) -> bool {
140140
true
141141
}
142142

src/dialect/databricks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Dialect for DatabricksDialect {
4848
}
4949

5050
/// <https://docs.databricks.com/gcp/en/delta/history#delta-time-travel-syntax>
51-
fn supports_timestamp_versioning(&self) -> bool {
51+
fn supports_table_versioning(&self) -> bool {
5252
true
5353
}
5454

src/dialect/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ pub trait Dialect: Debug + Any {
10601060

10611061
/// Returns true if this dialect supports querying historical table data
10621062
/// by specifying which version of the data to query.
1063-
fn supports_timestamp_versioning(&self) -> bool {
1063+
fn supports_table_versioning(&self) -> bool {
10641064
false
10651065
}
10661066

src/dialect/mssql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl Dialect for MsSqlDialect {
107107
}
108108

109109
/// See: <https://learn.microsoft.com/en-us/sql/relational-databases/tables/querying-data-in-a-system-versioned-temporal-table>
110-
fn supports_timestamp_versioning(&self) -> bool {
110+
fn supports_table_versioning(&self) -> bool {
111111
true
112112
}
113113

src/dialect/snowflake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ impl Dialect for SnowflakeDialect {
536536
}
537537

538538
/// See: <https://docs.snowflake.com/en/sql-reference/constructs/at-before>
539-
fn supports_timestamp_versioning(&self) -> bool {
539+
fn supports_table_versioning(&self) -> bool {
540540
true
541541
}
542542

src/parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15484,7 +15484,7 @@ impl<'a> Parser<'a> {
1548415484

1548515485
/// Parses a the timestamp version specifier (i.e. query historical data)
1548615486
pub fn maybe_parse_table_version(&mut self) -> Result<Option<TableVersion>, ParserError> {
15487-
if self.dialect.supports_timestamp_versioning() {
15487+
if self.dialect.supports_table_versioning() {
1548815488
if self.parse_keywords(&[Keyword::FOR, Keyword::SYSTEM_TIME, Keyword::AS, Keyword::OF])
1548915489
{
1549015490
let expr = self.parse_expr()?;

0 commit comments

Comments
 (0)