Possible feature: Add support for conditional joins over ConstantExpression
See original GitHub issueCurrently, there is no way how to do conditional join.
I can use trick with multi-column (tuples):
let query =
select {
for l in table<MultiJoinLeft> do
leftJoin r in table<MultiJoinRight> on ((123, l.Key2) = (r.Key1, r.Key2))
selectAll
}
…but this fails with NotImplementedException, because of ConstantExpression
.
Need to investigate how difficult this could be to add…
cc: @JordanMarr : Any thoughts on this? 🤔
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Possible to implement a conditional join clause
Is it possible to implement a conditional join clause in Entity Framework 6? Specifically, INNER JOIN ON (boolean condition1) OR (boolean ...
Read more >A different way of merging in Power BI
In this video I show you how to do a conditional join in Power Query. Instead of using the merge feature from the...
Read more >Query syntax | BigQuery
The join operator and join condition specify how to combine and discard rows from the two from_item s to form a single source....
Read more >Conditional Join
I think the following will help: Join both of the tables thru' Append Fields and insert a Filter where you use custom filters...
Read more >SQL Conditional Join: A Comprehensive Guide
SQL conditional joins are a powerful technique for combining data from multiple tables based on specific conditions, allowing users to create more dynamic...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the tuple
on
syntax would map toLeftJoinOnMany
which would probably be the easiest approach that would avoid having to change theInnerJoin
andLeftJoin
DUs.But if I am understanding you correctly, implementing the “ideal syntax” example would involve changing to something like this:
Which seems like that might be a good way to go. In fact that might even eliminate the need for
InnerJoinOnMany
andLeftJoinOnMany
, which could actually be a nice consolidation:That’s exactly what I did for the builder/expressions part. I will start a draft PR with what I have done so far.