Skip to content

Commit 2902c66

Browse files
committed
chore: fmt
1 parent 05fd8d9 commit 2902c66

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

src/ast/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ pub use self::operator::{BinaryOperator, UnaryOperator};
3636
pub use self::query::{
3737
Cte, ExceptSelectItem, ExcludeSelectItem, Fetch, IdentWithAlias, Join, JoinConstraint,
3838
JoinOperator, LateralView, LockClause, LockType, NonBlock, Offset, OffsetRows, OrderByExpr,
39-
Query, RenameSelectItem, ReplaceSelectItem, Select, SelectInto, SelectItem, SetExpr, SetOperator, SetQuantifier,
40-
Table, TableAlias, TableFactor, TableWithJoins, Top, Values, WildcardAdditionalOptions, With,
39+
Query, RenameSelectItem, ReplaceSelectItem, Select, SelectInto, SelectItem, SetExpr,
40+
SetOperator, SetQuantifier, Table, TableAlias, TableFactor, TableWithJoins, Top, Values,
41+
WildcardAdditionalOptions, With,
4142
};
4243
pub use self::value::{
4344
escape_quoted_string, DateTimeField, DollarQuotedString, TrimWhereField, Value,

src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6161,7 +6161,7 @@ impl<'a> Parser<'a> {
61616161
Ok(opt_rename)
61626162
}
61636163

6164-
/// Parse a [`Replace](RepalceSelectItem) information for wildcard select items.
6164+
/// Parse a [`Replace`](RepalceSelectItem) information for wildcard select items.
61656165
pub fn parse_optional_select_item_replace(
61666166
&mut self,
61676167
) -> Result<Option<ReplaceSelectItem>, ParserError> {

tests/sqlparser_bigquery.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ use test_utils::*;
1818
use sqlparser::ast::*;
1919
use sqlparser::dialect::{BigQueryDialect, GenericDialect};
2020

21+
#[cfg(feature = "bigdecimal")]
22+
use bigdecimal::*;
23+
#[cfg(feature = "bigdecimal")]
24+
use std::str::FromStr;
25+
2126
#[test]
2227
fn parse_literal_string() {
2328
let sql = r#"SELECT 'single', "double""#;
@@ -318,7 +323,13 @@ fn test_select_wildcard_with_replace() {
318323
expr: Expr::BinaryOp {
319324
left: Box::new(Expr::Identifier(Ident::new("quantity"))),
320325
op: BinaryOperator::Divide,
326+
#[cfg(not(feature = "bigdecimal"))]
321327
right: Box::new(Expr::Value(Value::Number("2".to_string(), false))),
328+
#[cfg(feature = "bigdecimal")]
329+
right: Box::new(Expr::Value(Value::Number(
330+
BigDecimal::from_str("2").unwrap(),
331+
false,
332+
))),
322333
},
323334
alias: Ident::new("quantity"),
324335
},

0 commit comments

Comments
 (0)