@@ -906,7 +906,10 @@ fn parse_typed_struct_syntax_bigquery() {
906906 & Expr :: Struct {
907907 values: vec![ Expr :: TypedString {
908908 data_type: DataType :: Datetime ( None ) ,
909- value: Value :: SingleQuotedString ( "1999-01-01 01:23:34.45" . into( ) )
909+ value: ValueWithSpan {
910+ value: Value :: SingleQuotedString ( "1999-01-01 01:23:34.45" . into( ) ) ,
911+ span: Span :: empty( ) ,
912+ } ,
910913 } ] ,
911914 fields: vec![ StructField {
912915 field_name: None ,
@@ -965,9 +968,12 @@ fn parse_typed_struct_syntax_bigquery() {
965968 & Expr :: Struct {
966969 values: vec![ Expr :: TypedString {
967970 data_type: DataType :: JSON ,
968- value: Value :: SingleQuotedString (
969- r#"{"class" : {"students" : [{"name" : "Jane"}]}}"# . into( )
970- )
971+ value: ValueWithSpan {
972+ value: Value :: SingleQuotedString (
973+ r#"{"class" : {"students" : [{"name" : "Jane"}]}}"# . into( )
974+ ) ,
975+ span: Span :: empty( ) ,
976+ }
971977 } ] ,
972978 fields: vec![ StructField {
973979 field_name: None ,
@@ -998,7 +1004,12 @@ fn parse_typed_struct_syntax_bigquery() {
9981004 & Expr :: Struct {
9991005 values: vec![ Expr :: TypedString {
10001006 data_type: DataType :: Timestamp ( None , TimezoneInfo :: None ) ,
1001- value: Value :: SingleQuotedString ( "2008-12-25 15:30:00 America/Los_Angeles" . into( ) )
1007+ value: ValueWithSpan {
1008+ value: Value :: SingleQuotedString (
1009+ "2008-12-25 15:30:00 America/Los_Angeles" . into( )
1010+ ) ,
1011+ span: Span :: empty( ) ,
1012+ } ,
10021013 } ] ,
10031014 fields: vec![ StructField {
10041015 field_name: None ,
@@ -1013,7 +1024,10 @@ fn parse_typed_struct_syntax_bigquery() {
10131024 & Expr :: Struct {
10141025 values: vec![ Expr :: TypedString {
10151026 data_type: DataType :: Time ( None , TimezoneInfo :: None ) ,
1016- value: Value :: SingleQuotedString ( "15:30:00" . into( ) )
1027+ value: ValueWithSpan {
1028+ value: Value :: SingleQuotedString ( "15:30:00" . into( ) ) ,
1029+ span: Span :: empty( ) ,
1030+ }
10171031 } ] ,
10181032 fields: vec![ StructField {
10191033 field_name: None ,
@@ -1031,7 +1045,10 @@ fn parse_typed_struct_syntax_bigquery() {
10311045 & Expr :: Struct {
10321046 values: vec![ Expr :: TypedString {
10331047 data_type: DataType :: Numeric ( ExactNumberInfo :: None ) ,
1034- value: Value :: SingleQuotedString ( "1" . into( ) )
1048+ value: ValueWithSpan {
1049+ value: Value :: SingleQuotedString ( "1" . into( ) ) ,
1050+ span: Span :: empty( ) ,
1051+ }
10351052 } ] ,
10361053 fields: vec![ StructField {
10371054 field_name: None ,
@@ -1045,7 +1062,10 @@ fn parse_typed_struct_syntax_bigquery() {
10451062 & Expr :: Struct {
10461063 values: vec![ Expr :: TypedString {
10471064 data_type: DataType :: BigNumeric ( ExactNumberInfo :: None ) ,
1048- value: Value :: SingleQuotedString ( "1" . into( ) )
1065+ value: ValueWithSpan {
1066+ value: Value :: SingleQuotedString ( "1" . into( ) ) ,
1067+ span: Span :: empty( ) ,
1068+ }
10491069 } ] ,
10501070 fields: vec![ StructField {
10511071 field_name: None ,
@@ -1219,7 +1239,10 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
12191239 & Expr :: Struct {
12201240 values: vec![ Expr :: TypedString {
12211241 data_type: DataType :: Datetime ( None ) ,
1222- value: Value :: SingleQuotedString ( "1999-01-01 01:23:34.45" . into( ) )
1242+ value: ValueWithSpan {
1243+ value: Value :: SingleQuotedString ( "1999-01-01 01:23:34.45" . into( ) ) ,
1244+ span: Span :: empty( ) ,
1245+ }
12231246 } ] ,
12241247 fields: vec![ StructField {
12251248 field_name: None ,
@@ -1278,9 +1301,12 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
12781301 & Expr :: Struct {
12791302 values: vec![ Expr :: TypedString {
12801303 data_type: DataType :: JSON ,
1281- value: Value :: SingleQuotedString (
1282- r#"{"class" : {"students" : [{"name" : "Jane"}]}}"# . into( )
1283- )
1304+ value: ValueWithSpan {
1305+ value: Value :: SingleQuotedString (
1306+ r#"{"class" : {"students" : [{"name" : "Jane"}]}}"# . into( )
1307+ ) ,
1308+ span: Span :: empty( ) ,
1309+ }
12841310 } ] ,
12851311 fields: vec![ StructField {
12861312 field_name: None ,
@@ -1311,7 +1337,12 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
13111337 & Expr :: Struct {
13121338 values: vec![ Expr :: TypedString {
13131339 data_type: DataType :: Timestamp ( None , TimezoneInfo :: None ) ,
1314- value: Value :: SingleQuotedString ( "2008-12-25 15:30:00 America/Los_Angeles" . into( ) )
1340+ value: ValueWithSpan {
1341+ value: Value :: SingleQuotedString (
1342+ "2008-12-25 15:30:00 America/Los_Angeles" . into( )
1343+ ) ,
1344+ span: Span :: empty( ) ,
1345+ }
13151346 } ] ,
13161347 fields: vec![ StructField {
13171348 field_name: None ,
@@ -1326,7 +1357,10 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
13261357 & Expr :: Struct {
13271358 values: vec![ Expr :: TypedString {
13281359 data_type: DataType :: Time ( None , TimezoneInfo :: None ) ,
1329- value: Value :: SingleQuotedString ( "15:30:00" . into( ) )
1360+ value: ValueWithSpan {
1361+ value: Value :: SingleQuotedString ( "15:30:00" . into( ) ) ,
1362+ span: Span :: empty( ) ,
1363+ }
13301364 } ] ,
13311365 fields: vec![ StructField {
13321366 field_name: None ,
@@ -1344,7 +1378,10 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
13441378 & Expr :: Struct {
13451379 values: vec![ Expr :: TypedString {
13461380 data_type: DataType :: Numeric ( ExactNumberInfo :: None ) ,
1347- value: Value :: SingleQuotedString ( "1" . into( ) )
1381+ value: ValueWithSpan {
1382+ value: Value :: SingleQuotedString ( "1" . into( ) ) ,
1383+ span: Span :: empty( ) ,
1384+ }
13481385 } ] ,
13491386 fields: vec![ StructField {
13501387 field_name: None ,
@@ -1358,7 +1395,10 @@ fn parse_typed_struct_syntax_bigquery_and_generic() {
13581395 & Expr :: Struct {
13591396 values: vec![ Expr :: TypedString {
13601397 data_type: DataType :: BigNumeric ( ExactNumberInfo :: None ) ,
1361- value: Value :: SingleQuotedString ( "1" . into( ) )
1398+ value: ValueWithSpan {
1399+ value: Value :: SingleQuotedString ( "1" . into( ) ) ,
1400+ span: Span :: empty( ) ,
1401+ }
13621402 } ] ,
13631403 fields: vec![ StructField {
13641404 field_name: None ,
@@ -2393,7 +2433,10 @@ fn test_triple_quote_typed_strings() {
23932433 assert_eq ! (
23942434 Expr :: TypedString {
23952435 data_type: DataType :: JSON ,
2396- value: Value :: TripleDoubleQuotedString ( r#"{"foo":"bar's"}"# . into( ) )
2436+ value: ValueWithSpan {
2437+ value: Value :: TripleDoubleQuotedString ( r#"{"foo":"bar's"}"# . into( ) ) ,
2438+ span: Span :: empty( ) ,
2439+ }
23972440 } ,
23982441 expr
23992442 ) ;
0 commit comments