@@ -11,7 +11,7 @@ use super::{
11
11
FunctionArgumentClause , FunctionArgumentList , FunctionArguments , GroupByExpr , HavingBound ,
12
12
IlikeSelectItem , Insert , Interpolate , InterpolateExpr , Join , JoinConstraint , JoinOperator ,
13
13
JsonPath , JsonPathElem , LateralView , MatchRecognizePattern , Measure , NamedWindowDefinition ,
14
- ObjectName , Offset , OnConflict , OnConflictAction , OnInsert , OrderBy , OrderByExpr , Partition ,
14
+ ObjectName , ObjectNamePart , Offset , OnConflict , OnConflictAction , OnInsert , OrderBy , OrderByExpr , Partition ,
15
15
PivotValueSource , ProjectionSelect , Query , ReferentialAction , RenameSelectItem ,
16
16
ReplaceSelectElement , ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption ,
17
17
Statement , Subscript , SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint ,
@@ -1302,7 +1302,7 @@ impl Spanned for Expr {
1302
1302
. union_opt ( & overlay_for. as_ref ( ) . map ( |i| i. span ( ) ) ) ,
1303
1303
Expr :: Collate { expr, collation } => expr
1304
1304
. span ( )
1305
- . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ) ) ) ,
1305
+ . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ( ) ) ) ) ,
1306
1306
Expr :: Nested ( expr) => expr. span ( ) ,
1307
1307
Expr :: Value ( value) => value. span ( ) ,
1308
1308
Expr :: TypedString { .. } => Span :: empty ( ) ,
@@ -1411,7 +1411,7 @@ impl Spanned for Expr {
1411
1411
object_name
1412
1412
. 0
1413
1413
. iter ( )
1414
- . map ( |i| i. span )
1414
+ . map ( |i| i. span ( ) )
1415
1415
. chain ( iter:: once ( token. 0 . span ) ) ,
1416
1416
) ,
1417
1417
Expr :: OuterJoin ( expr) => expr. span ( ) ,
@@ -1447,7 +1447,15 @@ impl Spanned for ObjectName {
1447
1447
fn span ( & self ) -> Span {
1448
1448
let ObjectName ( segments) = self ;
1449
1449
1450
- union_spans ( segments. iter ( ) . map ( |i| i. span ) )
1450
+ union_spans ( segments. iter ( ) . map ( |i| i. span ( ) ) )
1451
+ }
1452
+ }
1453
+
1454
+ impl Spanned for ObjectNamePart {
1455
+ fn span ( & self ) -> Span {
1456
+ match self {
1457
+ ObjectNamePart :: Identifier ( ident) => ident. span ,
1458
+ }
1451
1459
}
1452
1460
}
1453
1461
@@ -1477,7 +1485,7 @@ impl Spanned for Function {
1477
1485
union_spans (
1478
1486
name. 0
1479
1487
. iter ( )
1480
- . map ( |i| i. span )
1488
+ . map ( |i| i. span ( ) )
1481
1489
. chain ( iter:: once ( args. span ( ) ) )
1482
1490
. chain ( iter:: once ( parameters. span ( ) ) )
1483
1491
. chain ( filter. iter ( ) . map ( |i| i. span ( ) ) )
@@ -1563,7 +1571,7 @@ impl Spanned for SelectItem {
1563
1571
object_name
1564
1572
. 0
1565
1573
. iter ( )
1566
- . map ( |i| i. span )
1574
+ . map ( |i| i. span ( ) )
1567
1575
. chain ( iter:: once ( wildcard_additional_options. span ( ) ) ) ,
1568
1576
) ,
1569
1577
SelectItem :: Wildcard ( wildcard_additional_options) => wildcard_additional_options. span ( ) ,
@@ -1672,7 +1680,7 @@ impl Spanned for TableFactor {
1672
1680
} => union_spans (
1673
1681
name. 0
1674
1682
. iter ( )
1675
- . map ( |i| i. span )
1683
+ . map ( |i| i. span ( ) )
1676
1684
. chain ( alias. as_ref ( ) . map ( |alias| {
1677
1685
union_spans (
1678
1686
iter:: once ( alias. name . span )
@@ -1717,7 +1725,7 @@ impl Spanned for TableFactor {
1717
1725
} => union_spans (
1718
1726
name. 0
1719
1727
. iter ( )
1720
- . map ( |i| i. span )
1728
+ . map ( |i| i. span ( ) )
1721
1729
. chain ( args. iter ( ) . map ( |i| i. span ( ) ) )
1722
1730
. chain ( alias. as_ref ( ) . map ( |alias| alias. span ( ) ) ) ,
1723
1731
) ,
@@ -1868,7 +1876,7 @@ impl Spanned for FunctionArgExpr {
1868
1876
match self {
1869
1877
FunctionArgExpr :: Expr ( expr) => expr. span ( ) ,
1870
1878
FunctionArgExpr :: QualifiedWildcard ( object_name) => {
1871
- union_spans ( object_name. 0 . iter ( ) . map ( |i| i. span ) )
1879
+ union_spans ( object_name. 0 . iter ( ) . map ( |i| i. span ( ) ) )
1872
1880
}
1873
1881
FunctionArgExpr :: Wildcard => Span :: empty ( ) ,
1874
1882
}
0 commit comments