From 1292512a48f34882ebdf9cd5c40b58657371170d Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Sat, 8 Jun 2024 23:32:24 +0200 Subject: [PATCH] Add missing check for predicate in primitive collection simplifications (#3196) Fixes #3195 (cherry picked from commit 3b71c73c2092bfbdd4b0d397a731cc3bdb0b2112) --- .../NpgsqlQueryableMethodTranslatingExpressionVisitor.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/EFCore.PG/Query/Internal/NpgsqlQueryableMethodTranslatingExpressionVisitor.cs b/src/EFCore.PG/Query/Internal/NpgsqlQueryableMethodTranslatingExpressionVisitor.cs index 1f7f060be..6b929e47a 100644 --- a/src/EFCore.PG/Query/Internal/NpgsqlQueryableMethodTranslatingExpressionVisitor.cs +++ b/src/EFCore.PG/Query/Internal/NpgsqlQueryableMethodTranslatingExpressionVisitor.cs @@ -542,6 +542,7 @@ protected override Expression ApplyInferredTypeMappings( Source1: { Tables: [PgUnnestExpression { Array: var array1 }], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -551,6 +552,7 @@ protected override Expression ApplyInferredTypeMappings( Source2: { Tables: [PgUnnestExpression { Array: var array2 }], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -667,6 +669,7 @@ protected override Expression ApplyInferredTypeMappings( && source.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array }], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -704,6 +707,7 @@ protected override ShapedQueryExpression TranslateConcat(ShapedQueryExpression s if (source1.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array1 } unnestExpression1], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -714,6 +718,7 @@ protected override ShapedQueryExpression TranslateConcat(ShapedQueryExpression s && source2.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array2 }], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -780,6 +785,7 @@ protected override ShapedQueryExpression TranslateConcat(ShapedQueryExpression s && source.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array }], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -907,6 +913,7 @@ protected override ShapedQueryExpression TranslateConcat(ShapedQueryExpression s if (source.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array } unnestExpression], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false, @@ -970,6 +977,7 @@ protected override ShapedQueryExpression TranslateConcat(ShapedQueryExpression s if (source.QueryExpression is SelectExpression { Tables: [PgUnnestExpression { Array: var array } unnestExpression], + Predicate: null, GroupBy: [], Having: null, IsDistinct: false,