Skip to content

Commit

Permalink
chore: bump sqlparser from 0.52.0 to 0.53.0 (#5079)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
  • Loading branch information
dependabot[bot] and max-sixty authored Jan 26, 2025
1 parent f4d1ebb commit a08d66f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 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 @@ -70,7 +70,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true, optional = true }
sqlformat = "0.3.5"
sqlparser = { version = "0.52.0", features = ["serde"] }
sqlparser = { version = "0.53.0", features = ["serde"] }
strum = { version = "0.26.3", features = ["std", "derive"] }
strum_macros = "0.26.4"

Expand Down
5 changes: 4 additions & 1 deletion prqlc/prqlc/src/debug/render_html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ fn write_ast_node_from_object<W: Write>(
let span: Option<String> = properties.remove("span").and_then(|s| match s {
serde_json::Value::Null => None,
serde_json::Value::String(s) => Some(s),
_ => unreachable!("expected span to be string, got: {}", s),
_ => None,
// We previously used to error, but sqlparser now has a type that
// doesn't include spans, so we just ignore it.
// _ => unreachable!("expected span to be string, got: {}", s),
});
let ty: Option<serde_json::Value> = properties.remove("ty");

Expand Down
2 changes: 2 additions & 0 deletions prqlc/prqlc/src/sql/gen_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ fn process_concat(expr: &rq::Expr, ctx: &mut Context) -> Result<sql_ast::Expr> {
null_treatment: None,
within_group: vec![],
parameters: sql_ast::FunctionArguments::None,
uses_odbc_syntax: false,
}))
} else {
let concat_args = collect_concat_args(expr);
Expand Down Expand Up @@ -503,6 +504,7 @@ fn translate_datetime_literal_with_sqlite_function(
null_treatment: None,
within_group: vec![],
parameters: sql_ast::FunctionArguments::None,
uses_odbc_syntax: false,
})
}

Expand Down
4 changes: 4 additions & 0 deletions prqlc/prqlc/src/sql/gen_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub fn translate_query(query: RelationalQuery, dialect: Option<Dialect>) -> Resu
query.with = Some(sql_ast::With {
recursive,
cte_tables,
with_token: sqlparser::ast::helpers::attached_token::AttachedToken::empty(),
});
}

Expand Down Expand Up @@ -319,6 +320,7 @@ fn translate_relation_expr(relation_expr: RelationExpr, ctx: &mut Context) -> Re
with_ordinality: false,
version: None,
partitions: vec![],
json_path: None,
}
}
RelationExprKind::SubQuery(query) => {
Expand Down Expand Up @@ -428,6 +430,7 @@ fn translate_cte(cte: Cte, ctx: &mut Context) -> Result<(sql_ast::Cte, bool)> {
query: Box::new(query),
from: None,
materialized: None,
closing_paren_token: sqlparser::ast::helpers::attached_token::AttachedToken::empty(),
};
Ok((cte, recursive))
}
Expand Down Expand Up @@ -599,6 +602,7 @@ fn default_select() -> Select {
window_before_qualify: false,
connect_by: None,
prewhere: None,
select_token: sqlparser::ast::helpers::attached_token::AttachedToken::empty(),
}
}

Expand Down

0 comments on commit a08d66f

Please sign in to comment.