Skip to content

JOIN with nullable expression is not working #4875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

igor-tkachev
Copy link
Member

The following code is not working

from t2 in temp1
join t3 in temp2 on t2.ID equals t3.ID into gt3
from t3 in gt3.DefaultIfEmpty()
let Value = t3.Value ?? t2.Value
//let Value = Sql.AsNullable(t3.Value) ?? t2.Value
join t4 in temp3 on new { Value } equals new { t4.Value } into gt5
from t4 in gt5.DefaultIfEmpty()
select t4

If you uncomment the commented line, the code works.

Worked in 2.xxx

@igor-tkachev igor-tkachev requested a review from sdanyliv March 14, 2025 16:14
@igor-tkachev igor-tkachev self-assigned this Mar 14, 2025
@igor-tkachev igor-tkachev marked this pull request as draft March 14, 2025 16:14
@MaceWindu MaceWindu added this to the 6.0.0-rc.1 milestone Mar 15, 2025
@sdanyliv
Copy link
Member

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@linq2dbot
Copy link

Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed.

@sdanyliv
Copy link
Member

@MaceWindu, wrong fix. Will continue analyse.

@sdanyliv
Copy link
Member

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MaceWindu MaceWindu modified the milestones: 6.0.0-preview.4, 6.0.0-rc.1 Mar 26, 2025
# Conflicts:
#	Tests/Base/TestBase.Asserts.cs
@MaceWindu MaceWindu mentioned this pull request May 6, 2025
21 tasks
sdanyliv added 3 commits June 18, 2025 11:53
# Conflicts:
#	Source/LinqToDB/Linq/Builder/ExpressionBuildVisitor.cs
#	Source/LinqToDB/SqlProvider/SqlExpressionOptimizerVisitor.cs
#	Source/LinqToDB/SqlQuery/NullabilityContext.cs
@sdanyliv
Copy link
Member

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdanyliv
Copy link
Member

/azp run test-oracle

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@linq2dbot
Copy link

Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed.

@sdanyliv
Copy link
Member

/azp run test-oracle

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdanyliv
Copy link
Member

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdanyliv
Copy link
Member

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

4 participants