You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Query: Apply optimizations to composite predicates in all parts of the query #7608
Currently CompositePredicateExpressionVisitor is only applied to predicates. Perhaps some of the work we do there could be applied in other places (e.g projections)
See Tests Optional_navigation_type_compensation_works_with_contains Any_with_optional_navigation_as_subquery_predicate_is_translated_to_sql All_with_optional_navigation_is_translated_to_sql Optional_navigation_type_compensation_works_with_all
Assert.Equal(@"SELECT CASE WHEN NOT EXISTS ( SELECT 1 FROM [CogTag] AS [t] LEFT JOIN ( SELECT [t.Gear].[Nickname], [t.Gear].[SquadId], [t.Gear].[AssignedCityName], [t.Gear].[CityOrBirthName], [t.Gear].[Discriminator], [t.Gear].[FullName], [t.Gear].[HasSoulPatch], [t.Gear].[LeaderNickname], [t.Gear].[LeaderSquadId], [t.Gear].[Rank] FROM [Gear] AS [t.Gear] WHERE ([t.Gear].[Discriminator] = N'Officer') OR ([t.Gear].[Discriminator] = N'Gear') //<--- BAD LINE ) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]) WHERE (([t].[Note] <> N'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = 0)) THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT)END",Sql);
changed the title [-]Query/Cleanup : see if we can use optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query/Cleanup : Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/+]on Feb 14, 2017
This is already fixed in latest dev. The issue in above query was, we had to go inside of ExistExpression. It was missing proper VisitChildren method. Which was done in #7646 Thanks @tuespetre
changed the title [-]Query/Cleanup : Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query: Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/+]on May 9, 2017
changed the title [-]Query: Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query: Apply optimizations to composite predicates in all parts of the query[/+]on May 10, 2017
Activity
smitpatel commentedon Feb 14, 2017
See Tests
Optional_navigation_type_compensation_works_with_containsAny_with_optional_navigation_as_subquery_predicate_is_translated_to_sqlAll_with_optional_navigation_is_translated_to_sqlOptional_navigation_type_compensation_works_with_all[-]Query/Cleanup : see if we can use optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query/Cleanup : Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/+]smitpatel commentedon Apr 28, 2017
Can I poach this?
smitpatel commentedon May 5, 2017
This is already fixed in latest dev. The issue in above query was, we had to go inside of ExistExpression. It was missing proper VisitChildren method. Which was done in #7646 Thanks @tuespetre
[-]Query/Cleanup : Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query: Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/+][-]Query: Apply optimizations from CompositePredicateExpressionVisitor in other parts of the query[/-][+]Query: Apply optimizations to composite predicates in all parts of the query[/+]