Skip to content

Commit

Permalink
Handle queries in parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed Nov 18, 2021
1 parent e6739eb commit 2b62d11
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MarkMpn.Sql4Cds.Engine/ExecutionPlanBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,14 @@ private SelectNode ConvertSelectStatement(QueryExpression query, IList<Optimizer
if (query is BinaryQueryExpression binary)
return ConvertBinaryQuery(binary, hints, outerSchema, outerReferences, parameterTypes);

if (query is QueryParenthesisExpression paren)
{
paren.QueryExpression.ForClause = paren.ForClause;
paren.QueryExpression.OffsetClause = paren.OffsetClause;
paren.QueryExpression.OrderByClause = paren.OrderByClause;
return ConvertSelectStatement(paren.QueryExpression, hints, outerSchema, outerReferences, parameterTypes);
}

throw new NotSupportedQueryFragmentException("Unhandled SELECT query expression", query);
}

Expand Down

0 comments on commit 2b62d11

Please sign in to comment.