Skip to content

Commit

Permalink
chore: bump sqlparser from 0.48.0 to 0.49.0 (#4800)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan <[email protected]>
  • Loading branch information
dependabot[bot] and vanillajonathan authored Jul 29, 2024
1 parent b7628d5 commit 9942900
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prqlc/prqlc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ serde = {workspace = true}
serde_json = {workspace = true}
serde_yaml = {workspace = true, optional = true}
sqlformat = "0.2.4"
sqlparser = {version = "0.48.0", features = ["serde"]}
sqlparser = {version = "0.49.0", features = ["serde"]}
strum = {version = "0.26.3", features = ["std", "derive"]}
strum_macros = "0.26.4"

Expand Down
1 change: 1 addition & 0 deletions prqlc/prqlc/src/sql/gen_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ pub(super) fn translate_column_sort(
Some(false)
},
nulls_first: None,
with_fill: None,
})
}

Expand Down
15 changes: 12 additions & 3 deletions prqlc/prqlc/src/sql/gen_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,22 @@ fn translate_select_pipeline(
)),
asc: None,
nulls_first: None,
with_fill: None,
});
}
}

ctx.pop_query();

Ok(sql_ast::Query {
order_by,
order_by: if order_by.is_empty() {
None
} else {
Some(sql_ast::OrderBy {
exprs: order_by,
interpolate: None,
})
},
limit,
offset,
fetch,
Expand Down Expand Up @@ -308,6 +316,7 @@ fn translate_relation_expr(relation_expr: RelationExpr, ctx: &mut Context) -> Re
},
args: None,
with_hints: vec![],
with_ordinality: false,
version: None,
partitions: vec![],
}
Expand Down Expand Up @@ -556,7 +565,7 @@ fn default_query(body: sql_ast::SetExpr) -> sql_ast::Query {
sql_ast::Query {
with: None,
body: Box::new(body),
order_by: Vec::new(),
order_by: None,
limit: None,
offset: None,
fetch: None,
Expand Down Expand Up @@ -600,7 +609,7 @@ fn simple_table_alias(name: sql_ast::Ident) -> TableAlias {

fn query_to_set_expr(query: sql_ast::Query, context: &mut Context) -> Box<SetExpr> {
let is_simple = query.with.is_none()
&& query.order_by.is_empty()
&& query.order_by.is_none()
&& query.limit.is_none()
&& query.offset.is_none()
&& query.fetch.is_none()
Expand Down

0 comments on commit 9942900

Please sign in to comment.