Skip to content

Translate Enumerable.Concat over byte arrays #39345

Description

@roji

Support translating Enumerable.Concat over byte[] properties mapped to scalar binary columns, including further composition:

byte[] suffix = [1, 2];

context.Entities.Where(e => e.Bytes.Concat(suffix).ToArray().Length == 6);
context.Entities.Select(e => e.Bytes.Concat(new byte[] { 1, 2 }).ToArray());

Neither the SQL Server nor SQLite provider currently implements this translation, and ByteArrayTranslationsTestBase has no shared Concat coverage (checked our EF 11 RC2 dependency and current main). Shared tests should cover parameters, inline/empty byte arrays, projections and composition such as Length and SequenceEqual.

EF's normalization/query-root processing also needs consideration: parameter-first prefix.Concat(e.Bytes) becomes Queryable.Concat, while inline array operands become InlineQueryRootExpression, complicating scalar binary translation.

Related PostgreSQL provider implementation: npgsql/efcore.pg#2200.

Activity

  1. added this to the Backlog milestone on Oct 20, 2026
  2. added theissue type on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions