[
https://issues.apache.org/jira/browse/CALCITE-2920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16792437#comment-16792437
]
Ruben Quesada Lopez commented on CALCITE-2920:
----------------------------------------------
The idea would be something like:
{code:java}
// Retrieve departments without employees. Equivalent SQL:
// SELECT * FROM dept d WHERE NOT EXISTS (SELECT 1 FROM emp e WHERE
e.deptno = d.deptno)
final RelBuilder builder = RelBuilder.create(config().build());
RelNode root = builder
.scan("DEPT")
.scan("EMP")
.antiJoin(
builder.equals(
builder.field(2, 0, "DEPTNO"),
builder.field(2, 1, "DEPTNO")))
.build();
{code}
> RelBuilder: new method to create an antijoin
> --------------------------------------------
>
> Key: CALCITE-2920
> URL: https://issues.apache.org/jira/browse/CALCITE-2920
> Project: Calcite
> Issue Type: New Feature
> Reporter: Ruben Quesada Lopez
> Assignee: Ruben Quesada Lopez
> Priority: Major
>
> Add new method to RelBuilder in order to create an antijoin.
> Since, for the moment, there is no "AntiJoin" expression, the only
> possibility to build an AntiJoin is using a LogicalCorrelate with
> SemiJoinType.ANTI
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)