You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by if...@apache.org on 2026/04/17 08:21:40 UTC
(datafusion-sqlparser-rs) branch clippy-1.95-fixes created (now 5b8765b4)
This is an automated email from the ASF dual-hosted git repository.
iffyio pushed a change to branch clippy-1.95-fixes
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
at 5b8765b4 Fix clippy 1.95 lint errors
This branch includes the following new commits:
new 5b8765b4 Fix clippy 1.95 lint errors
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org
(datafusion-sqlparser-rs) 01/01: Fix clippy 1.95 lint errors
Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
iffyio pushed a commit to branch clippy-1.95-fixes
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
commit 5b8765b4126cfa94aca550b0c1c7f4f6401806d1
Author: ifeanyi <if...@validio.io>
AuthorDate: Fri Apr 17 10:21:12 2026 +0200
Fix clippy 1.95 lint errors
---
src/parser/mod.rs | 50 ++++++++++++++++----------------------------------
1 file changed, 16 insertions(+), 34 deletions(-)
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index a5526723..ff2487d5 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -508,11 +508,10 @@ impl<'a> Parser<'a> {
Token::EOF => break,
// end of statement
- Token::Word(word) => {
- if expecting_statement_delimiter && word.keyword == Keyword::END {
+ Token::Word(word)
+ if expecting_statement_delimiter && word.keyword == Keyword::END => {
break;
}
- }
_ => {}
}
@@ -1305,8 +1304,8 @@ impl<'a> Parser<'a> {
let next_token = self.next_token();
match next_token.token {
- t @ (Token::Word(_) | Token::SingleQuotedString(_)) => {
- if self.peek_token_ref().token == Token::Period {
+ t @ (Token::Word(_) | Token::SingleQuotedString(_))
+ if self.peek_token_ref().token == Token::Period => {
let mut id_parts: Vec<Ident> = vec![match t {
Token::Word(w) => w.into_ident(next_token.span),
Token::SingleQuotedString(s) => Ident::with_quote('\'', s),
@@ -1343,7 +1342,6 @@ impl<'a> Parser<'a> {
}
}
}
- }
Token::Mul => {
return Ok(Expr::Wildcard(AttachedToken(next_token)));
}
@@ -5031,11 +5029,10 @@ impl<'a> Parser<'a> {
loop {
match &self.peek_nth_token_ref(0).token {
Token::EOF => break,
- Token::Word(w) => {
- if w.quote_style.is_none() && terminal_keywords.contains(&w.keyword) {
+ Token::Word(w)
+ if w.quote_style.is_none() && terminal_keywords.contains(&w.keyword) => {
break;
}
- }
_ => {}
}
@@ -8377,8 +8374,8 @@ impl<'a> Parser<'a> {
Keyword::LINES,
Keyword::NULL,
]) {
- Some(Keyword::FIELDS) => {
- if self.parse_keywords(&[Keyword::TERMINATED, Keyword::BY]) {
+ Some(Keyword::FIELDS)
+ if self.parse_keywords(&[Keyword::TERMINATED, Keyword::BY]) => {
row_delimiters.push(HiveRowDelimiter {
delimiter: HiveDelimiter::FieldsTerminatedBy,
char: self.parse_identifier()?,
@@ -8390,58 +8387,43 @@ impl<'a> Parser<'a> {
char: self.parse_identifier()?,
});
}
- } else {
- break;
}
- }
- Some(Keyword::COLLECTION) => {
+ Some(Keyword::COLLECTION)
if self.parse_keywords(&[
Keyword::ITEMS,
Keyword::TERMINATED,
Keyword::BY,
- ]) {
+ ]) => {
row_delimiters.push(HiveRowDelimiter {
delimiter: HiveDelimiter::CollectionItemsTerminatedBy,
char: self.parse_identifier()?,
});
- } else {
- break;
}
- }
- Some(Keyword::MAP) => {
+ Some(Keyword::MAP)
if self.parse_keywords(&[
Keyword::KEYS,
Keyword::TERMINATED,
Keyword::BY,
- ]) {
+ ]) => {
row_delimiters.push(HiveRowDelimiter {
delimiter: HiveDelimiter::MapKeysTerminatedBy,
char: self.parse_identifier()?,
});
- } else {
- break;
}
- }
- Some(Keyword::LINES) => {
- if self.parse_keywords(&[Keyword::TERMINATED, Keyword::BY]) {
+ Some(Keyword::LINES)
+ if self.parse_keywords(&[Keyword::TERMINATED, Keyword::BY]) => {
row_delimiters.push(HiveRowDelimiter {
delimiter: HiveDelimiter::LinesTerminatedBy,
char: self.parse_identifier()?,
});
- } else {
- break;
}
- }
- Some(Keyword::NULL) => {
- if self.parse_keywords(&[Keyword::DEFINED, Keyword::AS]) {
+ Some(Keyword::NULL)
+ if self.parse_keywords(&[Keyword::DEFINED, Keyword::AS]) => {
row_delimiters.push(HiveRowDelimiter {
delimiter: HiveDelimiter::NullDefinedAs,
char: self.parse_identifier()?,
});
- } else {
- break;
}
- }
_ => {
break;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org