Skip to content

Commit 4b4e73d

Browse files
committed
use a "dummy" error
1 parent 66da50a commit 4b4e73d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/parser.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,17 @@ impl Parser {
203203
// expression that should parse as the column name "date".
204204
return_ok_if_some!(self.maybe_parse(|parser| {
205205
match parser.parse_data_type()? {
206-
DataType::Interval => parser.parse_literal_interval(),
207-
// Single-quoted strings are parsed as custom data types, however this not desirable
208-
// when we are handling input like `"NOT 'a' NOT LIKE 'b'"` because this will produce a
209-
// TypedString instead of a SingleQuotedString. Further, this leads to issues where the
210-
// same input will yield a BinaryOperator instead of the correct UnaryOperator. Here we
211-
// handle that specific case by returning an error.
212-
DataType::Custom(..) => Err(ParserError::ParserError("".to_string())),
213-
data_type => Ok(Expr::TypedString {
214-
data_type,
215-
value: parser.parse_literal_string()?,
216-
}),
206+
DataType::Interval => parser.parse_literal_interval(),
207+
// Single-quoted strings are parsed as custom data types, however this not desirable
208+
// when we are handling input like `"NOT 'a' NOT LIKE 'b'"` because this will produce a
209+
// TypedString instead of a SingleQuotedString. Further, this leads to issues where the
210+
// same input will yield a BinaryOperator instead of the correct UnaryOperator. Here we
211+
// handle that specific case by returning an error.
212+
DataType::Custom(..) => parser_err!("dummy"),
213+
data_type => Ok(Expr::TypedString {
214+
data_type,
215+
value: parser.parse_literal_string()?,
216+
}),
217217
}
218218
}));
219219

0 commit comments

Comments
 (0)