@@ -768,7 +768,7 @@ fn parse_alter_table_alter_column() {
768768 ) {
769769 AlterTableOperation :: AlterColumn { column_name, op } => {
770770 assert_eq ! ( "is_active" , column_name. to_string( ) ) ;
771- let using_expr = Expr :: Value ( Value :: SingleQuotedString ( "text" . to_string ( ) ) ) ;
771+ let using_expr = Expr :: Value ( Value :: SingleQuotedString ( "text" . to_string ( ) ) . with_empty_span ( ) ) ;
772772 assert_eq ! (
773773 op,
774774 AlterColumnOperation :: SetDataType {
@@ -2201,7 +2201,7 @@ fn parse_pg_like_match_ops() {
22012201#[ test]
22022202fn parse_array_index_expr ( ) {
22032203 let num: Vec < Expr > = ( 0 ..=10 )
2204- . map ( |s| Expr :: Value ( number ( & s. to_string ( ) ) ) )
2204+ . map ( |s| Expr :: Value ( number ( & s. to_string ( ) ) . with_empty_span ( ) ) )
22052205 . collect ( ) ;
22062206
22072207 let sql = "SELECT foo[0] FROM foos" ;
@@ -2312,7 +2312,7 @@ fn parse_array_subscript() {
23122312 (
23132313 "(ARRAY[1, 2, 3, 4, 5, 6])[2]" ,
23142314 Subscript :: Index {
2315- index : Expr :: Value ( number ( "2" ) ) ,
2315+ index : Expr :: Value ( number ( "2" ) . with_empty_span ( ) ) ,
23162316 } ,
23172317 ) ,
23182318 (
@@ -2324,17 +2324,17 @@ fn parse_array_subscript() {
23242324 (
23252325 "(ARRAY[1, 2, 3, 4, 5, 6])[2:5]" ,
23262326 Subscript :: Slice {
2327- lower_bound : Some ( Expr :: Value ( number ( "2" ) ) ) ,
2328- upper_bound : Some ( Expr :: Value ( number ( "5" ) ) ) ,
2327+ lower_bound : Some ( Expr :: Value ( number ( "2" ) . with_empty_span ( ) ) ) ,
2328+ upper_bound : Some ( Expr :: Value ( number ( "5" ) . with_empty_span ( ) ) ) ,
23292329 stride : None ,
23302330 } ,
23312331 ) ,
23322332 (
23332333 "(ARRAY[1, 2, 3, 4, 5, 6])[2:5:3]" ,
23342334 Subscript :: Slice {
2335- lower_bound : Some ( Expr :: Value ( number ( "2" ) ) ) ,
2336- upper_bound : Some ( Expr :: Value ( number ( "5" ) ) ) ,
2337- stride : Some ( Expr :: Value ( number ( "3" ) ) ) ,
2335+ lower_bound : Some ( Expr :: Value ( number ( "2" ) . with_empty_span ( ) ) ) ,
2336+ upper_bound : Some ( Expr :: Value ( number ( "5" ) . with_empty_span ( ) ) ) ,
2337+ stride : Some ( Expr :: Value ( number ( "3" ) . with_empty_span ( ) ) ) ,
23382338 } ,
23392339 ) ,
23402340 (
@@ -2343,12 +2343,12 @@ fn parse_array_subscript() {
23432343 lower_bound : Some ( Expr :: BinaryOp {
23442344 left : Box :: new ( call ( "array_length" , [ Expr :: Identifier ( Ident :: new ( "arr" ) ) ] ) ) ,
23452345 op : BinaryOperator :: Minus ,
2346- right : Box :: new ( Expr :: Value ( number ( "3" ) ) ) ,
2346+ right : Box :: new ( Expr :: Value ( number ( "3" ) . with_empty_span ( ) ) ) ,
23472347 } ) ,
23482348 upper_bound : Some ( Expr :: BinaryOp {
23492349 left : Box :: new ( call ( "array_length" , [ Expr :: Identifier ( Ident :: new ( "arr" ) ) ] ) ) ,
23502350 op : BinaryOperator :: Minus ,
2351- right : Box :: new ( Expr :: Value ( number ( "1" ) ) ) ,
2351+ right : Box :: new ( Expr :: Value ( number ( "1" ) . with_empty_span ( ) ) ) ,
23522352 } ) ,
23532353 stride : None ,
23542354 } ,
@@ -2357,14 +2357,14 @@ fn parse_array_subscript() {
23572357 "(ARRAY[1, 2, 3, 4, 5, 6])[:5]" ,
23582358 Subscript :: Slice {
23592359 lower_bound : None ,
2360- upper_bound : Some ( Expr :: Value ( number ( "5" ) ) ) ,
2360+ upper_bound : Some ( Expr :: Value ( number ( "5" ) . with_empty_span ( ) ) ) ,
23612361 stride : None ,
23622362 } ,
23632363 ) ,
23642364 (
23652365 "(ARRAY[1, 2, 3, 4, 5, 6])[2:]" ,
23662366 Subscript :: Slice {
2367- lower_bound : Some ( Expr :: Value ( number ( "2" ) ) ) ,
2367+ lower_bound : Some ( Expr :: Value ( number ( "2" ) . with_empty_span ( ) ) ) ,
23682368 upper_bound : None ,
23692369 stride : None ,
23702370 } ,
@@ -4652,7 +4652,7 @@ fn parse_at_time_zone() {
46524652 kind : CastKind :: DoubleColon ,
46534653 expr : Box :: new ( Expr :: Value ( Value :: SingleQuotedString (
46544654 "America/Los_Angeles" . to_owned ( ) ,
4655- ) ) ) ,
4655+ ) . with_empty_span ( ) ) ) ,
46564656 data_type : DataType :: Text ,
46574657 format : None ,
46584658 } ) ,
@@ -4661,7 +4661,7 @@ fn parse_at_time_zone() {
46614661 right : Box :: new ( Expr :: Interval ( Interval {
46624662 value : Box :: new ( Expr :: Value ( Value :: SingleQuotedString (
46634663 "23 hours" . to_owned ( ) ,
4664- ) ) ) ,
4664+ ) . with_empty_span ( ) ) ) ,
46654665 leading_field : None ,
46664666 leading_precision : None ,
46674667 last_field : None ,
@@ -4790,7 +4790,7 @@ fn parse_create_after_update_trigger_with_condition() {
47904790 Ident :: new( "balance" ) ,
47914791 ] ) ) ,
47924792 op : BinaryOperator :: Gt ,
4793- right : Box :: new ( Expr :: Value ( number ( "10000" ) ) ) ,
4793+ right : Box :: new ( Expr :: Value ( number ( "10000" ) . with_empty_span ( ) ) ) ,
47944794 } ) ) ) ,
47954795 exec_body : TriggerExecBody {
47964796 exec_type : TriggerExecBodyType :: Function ,
0 commit comments