org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin Java Examples

The following examples show how to use org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CalcitePlanner.java    From herddb with Apache License 2.0 6 votes vote down vote up
private PlannerOp planEnumerableNestedLoopJoin(EnumerableNestedLoopJoin op, RelDataType rowType) {
    PlannerOp left = convertRelNode(op.getLeft(), null, false, false);
    PlannerOp right = convertRelNode(op.getRight(), null, false, false);
    CompiledSQLExpression condition = SQLExpressionCompiler.compileExpression(op.getCondition());
    final RelDataType _rowType = rowType == null ? op.getRowType() : rowType;
    List<RelDataTypeField> fieldList = _rowType.getFieldList();
    Column[] columns = new Column[fieldList.size()];
    String[] fieldNames = new String[columns.length];
    int i = 0;
    for (RelDataTypeField field : fieldList) {
        Column col = Column.column(field.getName().toLowerCase(),
                convertToHerdType(field.getType()));
        fieldNames[i] = col.name;
        columns[i++] = col;
    }
    return new NestedLoopJoinOp(fieldNames, columns,
            left, right, condition, op.getJoinType(), false);
}
 
Example #2
Source File: FlinkRelMdCollation.java    From flink with Apache License 2.0 4 votes vote down vote up
public com.google.common.collect.ImmutableList<RelCollation> collations(
		EnumerableNestedLoopJoin join,
		RelMetadataQuery mq) {
	return com.google.common.collect.ImmutableList.copyOf(
			enumerableNestedLoopJoin(mq, join.getLeft(), join.getRight(), join.getJoinType()));
}
 
Example #3
Source File: RelMdCollation.java    From calcite with Apache License 2.0 4 votes vote down vote up
public ImmutableList<RelCollation> collations(EnumerableNestedLoopJoin join,
    RelMetadataQuery mq) {
  return ImmutableList.copyOf(
      RelMdCollation.enumerableNestedLoopJoin(mq, join.getLeft(), join.getRight(),
          join.getJoinType()));
}