Skip to content

Document provider-facing breaking change: no-op SQL CAST stripping#5351

Open
roji wants to merge 1 commit intopreview.5from
roji/breaking-change-cast-stripping
Open

Document provider-facing breaking change: no-op SQL CAST stripping#5351
roji wants to merge 1 commit intopreview.5from
roji/breaking-change-cast-stripping

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented May 4, 2026

EF Core 11 now strips SqlUnaryExpression(Convert) nodes when the store type matches the operand's store type (dotnet/efcore#38156). This is a provider-facing breaking change because it can flush out imprecise translations that assigned a broad store type to a node and relied on a wrapping Convert to paper over it -- the Convert now gets stripped, leaving the imprecise type exposed.

This adds a note to the EF Core 11 provider-facing changes page so provider authors are aware they should review their translations and ensure Convert operands carry the correct, precise store type.

Copilot AI review requested due to automatic review settings May 4, 2026 14:54
@roji roji force-pushed the roji/breaking-change-cast-stripping branch from a16d33a to 20408d1 Compare May 4, 2026 14:55
@roji roji changed the base branch from main to preview.5 May 4, 2026 14:56
Add a note to the EF Core 11 provider-facing changes page documenting
that EF Core now strips SqlUnaryExpression(Convert) nodes when the store
type matches the operand's store type. This can expose imprecise
translations that relied on wrapping an imprecise store type in a Convert.

Refs dotnet/efcore#36247, dotnet/efcore#38156

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roji roji force-pushed the roji/breaking-change-cast-stripping branch from 20408d1 to dabcf9a Compare May 4, 2026 14:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a provider-facing note to EF Core 11 documentation to highlight a breaking change where no-op SQL CASTs (convert unary expressions with matching store types) are stripped, which may expose imprecise type mappings in provider translations.

Changes:

  • Documented no-op SQL CAST stripping behavior in EF Core 11 query translation.
  • Added guidance for provider authors to ensure Convert operands have precise store types to avoid unintended type propagation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants