Add support for TABLESAMPLE (#1580)

This commit is contained in:
Yoav Cohen 2024-12-15 10:40:25 +01:00 committed by GitHub
parent 7bc6ddb8fb
commit 316bb14135
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 546 additions and 458 deletions

View file

@ -73,6 +73,7 @@ fn parse_table_time_travel() {
partitions: vec![],
with_ordinality: false,
json_path: None,
sample: None,
},
joins: vec![]
},]
@ -221,6 +222,7 @@ fn parse_mssql_openjson() {
with_ordinality: false,
partitions: vec![],
json_path: None,
sample: None,
},
joins: vec![Join {
relation: TableFactor::OpenJsonTable {
@ -279,6 +281,7 @@ fn parse_mssql_openjson() {
with_ordinality: false,
partitions: vec![],
json_path: None,
sample: None,
},
joins: vec![Join {
relation: TableFactor::OpenJsonTable {
@ -338,6 +341,7 @@ fn parse_mssql_openjson() {
with_ordinality: false,
partitions: vec![],
json_path: None,
sample: None,
},
joins: vec![Join {
relation: TableFactor::OpenJsonTable {
@ -396,6 +400,7 @@ fn parse_mssql_openjson() {
with_ordinality: false,
partitions: vec![],
json_path: None,
sample: None,
},
joins: vec![Join {
relation: TableFactor::OpenJsonTable {
@ -434,6 +439,7 @@ fn parse_mssql_openjson() {
with_ordinality: false,
partitions: vec![],
json_path: None,
sample: None,
},
joins: vec![Join {
relation: TableFactor::OpenJsonTable {
@ -611,9 +617,7 @@ fn parse_delimited_identifiers() {
args,
with_hints,
version,
with_ordinality: _,
partitions: _,
json_path: _,
..
} => {
assert_eq!(vec![Ident::with_quote('"', "a table")], name.0);
assert_eq!(Ident::with_quote('"', "alias"), alias.unwrap().name);
@ -1082,20 +1086,11 @@ fn parse_substring_in_select() {
})],
into: None,
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident {
value: "test".to_string(),
quote_style: None,
span: Span::empty(),
}]),
alias: None,
args: None,
with_hints: vec![],
version: None,
partitions: vec![],
with_ordinality: false,
json_path: None,
},
relation: table_from_name(ObjectName(vec![Ident {
value: "test".to_string(),
quote_style: None,
span: Span::empty(),
}])),
joins: vec![]
}],
lateral_views: vec![],