@@ -44,22 +44,25 @@ fn parse_map_access_expr() {
4444 select_token: AttachedToken :: empty( ) ,
4545 top: None ,
4646 top_before_distinct: false ,
47- projection: vec![ UnnamedExpr ( Expr :: CompoundFieldAccess {
48- root: Box :: new( Identifier ( Ident {
49- value: "string_values" . to_string( ) ,
50- quote_style: None ,
51- span: Span :: empty( ) ,
52- } ) ) ,
53- access_chain: vec![ AccessExpr :: Subscript ( Subscript :: Index {
54- index: call(
55- "indexOf" ,
56- [
57- Expr :: Identifier ( Ident :: new( "string_names" ) ) ,
58- Expr :: value( Value :: SingleQuotedString ( "endpoint" . to_string( ) ) )
59- ]
60- ) ,
61- } ) ] ,
62- } ) ] ,
47+ projection: vec![ UnnamedExpr {
48+ expr: Expr :: CompoundFieldAccess {
49+ root: Box :: new( Identifier ( Ident {
50+ value: "string_values" . to_string( ) ,
51+ quote_style: None ,
52+ span: Span :: empty( ) ,
53+ } ) ) ,
54+ access_chain: vec![ AccessExpr :: Subscript ( Subscript :: Index {
55+ index: call(
56+ "indexOf" ,
57+ [
58+ Expr :: Identifier ( Ident :: new( "string_names" ) ) ,
59+ Expr :: value( Value :: SingleQuotedString ( "endpoint" . to_string( ) ) )
60+ ]
61+ ) ,
62+ } ) ] ,
63+ } ,
64+ prefix: None
65+ } ] ,
6366 into: None ,
6467 from: vec![ TableWithJoins {
6568 relation: table_from_name( ObjectName :: from( vec![ Ident :: new( "foos" ) ] ) ) ,
@@ -205,7 +208,11 @@ fn parse_delimited_identifiers() {
205208 expr_from_projection( & select. projection[ 1 ] ) ,
206209 ) ;
207210 match & select. projection [ 2 ] {
208- SelectItem :: ExprWithAlias { expr, alias } => {
211+ SelectItem :: ExprWithAlias {
212+ expr,
213+ alias,
214+ prefix : _,
215+ } => {
209216 assert_eq ! ( & Expr :: Identifier ( Ident :: with_quote( '"' , "simple id" ) ) , expr) ;
210217 assert_eq ! ( & Ident :: with_quote( '"' , "column alias" ) , alias) ;
211218 }
@@ -315,8 +322,14 @@ fn parse_alter_table_add_projection() {
315322 name: "my_name" . into( ) ,
316323 select: ProjectionSelect {
317324 projection: vec![
318- UnnamedExpr ( Identifier ( Ident :: new( "a" ) ) ) ,
319- UnnamedExpr ( Identifier ( Ident :: new( "b" ) ) ) ,
325+ UnnamedExpr {
326+ expr: Identifier ( Ident :: new( "a" ) ) ,
327+ prefix: None
328+ } ,
329+ UnnamedExpr {
330+ expr: Identifier ( Ident :: new( "b" ) ) ,
331+ prefix: None
332+ } ,
320333 ] ,
321334 group_by: Some ( GroupByExpr :: Expressions (
322335 vec![ Identifier ( Ident :: new( "a" ) ) ] ,
@@ -1000,7 +1013,10 @@ fn parse_select_parametric_function() {
10001013 let projection: & Vec < SelectItem > = query. body . as_select ( ) . unwrap ( ) . projection . as_ref ( ) ;
10011014 assert_eq ! ( projection. len( ) , 1 ) ;
10021015 match & projection[ 0 ] {
1003- UnnamedExpr ( Expr :: Function ( f) ) => {
1016+ UnnamedExpr {
1017+ expr : Expr :: Function ( f) ,
1018+ ..
1019+ } => {
10041020 let args = match & f. args {
10051021 FunctionArguments :: List ( ref args) => args,
10061022 _ => unreachable ! ( ) ,
@@ -1418,9 +1434,12 @@ fn parse_create_table_on_commit_and_as_query() {
14181434 assert_eq ! ( on_commit, Some ( OnCommit :: PreserveRows ) ) ;
14191435 assert_eq ! (
14201436 query. unwrap( ) . body. as_select( ) . unwrap( ) . projection,
1421- vec![ UnnamedExpr ( Expr :: Value (
1422- ( Value :: Number ( "1" . parse( ) . unwrap( ) , false ) ) . with_empty_span( )
1423- ) ) ]
1437+ vec![ UnnamedExpr {
1438+ expr: Expr :: Value (
1439+ ( Value :: Number ( "1" . parse( ) . unwrap( ) , false ) ) . with_empty_span( )
1440+ ) ,
1441+ prefix: None
1442+ } ]
14241443 ) ;
14251444 }
14261445 _ => unreachable ! ( ) ,
0 commit comments