fix the lateral parsing issue and broken test
This commit is contained in:
parent
e03090a6a1
commit
bfe07dce53
|
@ -514,7 +514,8 @@ tref
|
|||
> tref = nonJoinTref >>= optionSuffix joinTrefSuffix
|
||||
> nonJoinTref = choice [try (TRQueryExpr <$> parens queryExpr)
|
||||
> ,TRParens <$> parens tref
|
||||
> ,TRLateral <$> (try (keyword_ "lateral") *> tref)
|
||||
> ,TRLateral <$> (try (keyword_ "lateral")
|
||||
> *> nonJoinTref)
|
||||
> ,try (TRFunction <$> name
|
||||
> <*> parens (commaSep scalarExpr))
|
||||
> ,TRSimple <$> name]
|
||||
|
|
|
@ -28,9 +28,8 @@ these lateral queries make no sense but the syntax is valid
|
|||
> ,("select a from lateral a,b"
|
||||
> ,ms [TRLateral $ TRSimple "a", TRSimple "b"])
|
||||
|
||||
> -- not sure what the problem is
|
||||
> --,("select from a, lateral b"
|
||||
> -- ,ms [TRSimple "a", TRLateral $ TRSimple "b"])
|
||||
> ,("select a from a, lateral b"
|
||||
> ,ms [TRSimple "a", TRLateral $ TRSimple "b"])
|
||||
|
||||
> ,("select a from a natural join lateral b"
|
||||
> ,ms [TRJoin (TRSimple "a") JInner
|
||||
|
@ -38,10 +37,10 @@ these lateral queries make no sense but the syntax is valid
|
|||
> (Just JoinNatural)])
|
||||
|
||||
> -- the lateral binds on the outside of the join which is incorrect
|
||||
> --,("select a from lateral a natural join lateral b"
|
||||
> -- ,ms [TRJoin (TRLateral $ TRSimple "a") JInner
|
||||
> -- (TRLateral $ TRSimple "b")
|
||||
> -- (Just JoinNatural)])
|
||||
> ,("select a from lateral a natural join lateral b"
|
||||
> ,ms [TRJoin (TRLateral $ TRSimple "a") JInner
|
||||
> (TRLateral $ TRSimple "b")
|
||||
> (Just JoinNatural)])
|
||||
|
||||
|
||||
> ,("select a from t inner join u on expr"
|
||||
|
|
Loading…
Reference in a new issue