You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by ru...@apache.org on 2019/07/01 11:20:00 UTC
[calcite] branch master updated: [CALCITE-3133] Remove completely
SemiJoinType
This is an automated email from the ASF dual-hosted git repository.
rubenql pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new ceb13a1 [CALCITE-3133] Remove completely SemiJoinType
ceb13a1 is described below
commit ceb13a134502b950ce1ce1c25d9267aa51ca14b5
Author: rubenada <ru...@gmail.com>
AuthorDate: Mon Jul 1 12:21:58 2019 +0200
[CALCITE-3133] Remove completely SemiJoinType
---
.../org/apache/calcite/rel/core/Correlate.java | 9 --
.../calcite/rel/logical/LogicalCorrelate.java | 16 ---
.../java/org/apache/calcite/sql/SemiJoinType.java | 134 ---------------------
3 files changed, 159 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Correlate.java b/core/src/main/java/org/apache/calcite/rel/core/Correlate.java
index 445bfe7..7f94748 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Correlate.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Correlate.java
@@ -99,15 +99,6 @@ public abstract class Correlate extends BiRel {
this.requiredColumns = Objects.requireNonNull(requiredColumns);
}
- @Deprecated // to be removed before 1.21
- protected Correlate(RelOptCluster cluster, RelTraitSet traitSet,
- RelNode left, RelNode right, CorrelationId correlationId,
- ImmutableBitSet requiredColumns,
- org.apache.calcite.sql.SemiJoinType joinType) {
- this(cluster, traitSet, left, right, correlationId, requiredColumns,
- joinType.toJoinType());
- }
-
/**
* Creates a Correlate by parsing serialized output.
*
diff --git a/core/src/main/java/org/apache/calcite/rel/logical/LogicalCorrelate.java b/core/src/main/java/org/apache/calcite/rel/logical/LogicalCorrelate.java
index 7fb3720..137ca78 100644
--- a/core/src/main/java/org/apache/calcite/rel/logical/LogicalCorrelate.java
+++ b/core/src/main/java/org/apache/calcite/rel/logical/LogicalCorrelate.java
@@ -74,15 +74,6 @@ public final class LogicalCorrelate extends Correlate {
assert !CalciteSystemProperty.DEBUG.value() || isValid(Litmus.THROW, null);
}
- @Deprecated // to be removed before 1.21
- public LogicalCorrelate(RelOptCluster cluster, RelTraitSet traitSet,
- RelNode left, RelNode right, CorrelationId correlationId,
- ImmutableBitSet requiredColumns,
- org.apache.calcite.sql.SemiJoinType joinType) {
- this(cluster, traitSet, left, right, correlationId, requiredColumns,
- joinType.toJoinType());
- }
-
/**
* Creates a LogicalCorrelate by parsing serialized output.
*/
@@ -104,13 +95,6 @@ public final class LogicalCorrelate extends Correlate {
requiredColumns, joinType);
}
- @Deprecated // to be removed before 1.21
- public static LogicalCorrelate create(RelNode left, RelNode right,
- CorrelationId correlationId, ImmutableBitSet requiredColumns,
- org.apache.calcite.sql.SemiJoinType joinType) {
- return create(left, right, correlationId, requiredColumns, joinType.toJoinType());
- }
-
//~ Methods ----------------------------------------------------------------
@Override public LogicalCorrelate copy(RelTraitSet traitSet,
diff --git a/core/src/main/java/org/apache/calcite/sql/SemiJoinType.java b/core/src/main/java/org/apache/calcite/sql/SemiJoinType.java
deleted file mode 100644
index 2e2d16c..0000000
--- a/core/src/main/java/org/apache/calcite/sql/SemiJoinType.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.calcite.sql;
-
-import org.apache.calcite.linq4j.JoinType;
-import org.apache.calcite.rel.core.JoinRelType;
-import org.apache.calcite.sql.parser.SqlParserPos;
-
-import java.util.Locale;
-
-/**
- * Enumeration representing different join types used in correlation
- * relations.
- *
- * @deprecated Use {@link JoinRelType} instead.
- */
-@Deprecated // To be removed before 2.0
-public enum SemiJoinType {
- /**
- * Inner join.
- */
- INNER,
-
- /**
- * Left-outer join.
- */
- LEFT,
-
- /**
- * Semi-join.
- *
- * <p>For example, {@code EMP semi-join DEPT} finds all {@code EMP} records
- * that have a corresponding {@code DEPT} record:
- *
- * <blockquote><pre>
- * SELECT * FROM EMP
- * WHERE EXISTS (SELECT 1 FROM DEPT
- * WHERE DEPT.DEPTNO = EMP.DEPTNO)</pre>
- * </blockquote>
- */
- SEMI,
-
- /**
- * Anti-join.
- *
- * <p>For example, {@code EMP anti-join DEPT} finds all {@code EMP} records
- * that do not have a corresponding {@code DEPT} record:
- *
- * <blockquote><pre>
- * SELECT * FROM EMP
- * WHERE NOT EXISTS (SELECT 1 FROM DEPT
- * WHERE DEPT.DEPTNO = EMP.DEPTNO)</pre>
- * </blockquote>
- */
- ANTI;
-
- /** Lower-case name. */
- public final String lowerName = name().toLowerCase(Locale.ROOT);
-
- /**
- * Creates a parse-tree node representing an occurrence of this
- * condition type keyword at a particular position in the parsed
- * text.
- */
- public SqlLiteral symbol(SqlParserPos pos) {
- return SqlLiteral.createSymbol(this, pos);
- }
-
- public static SemiJoinType of(JoinRelType joinType) {
- switch (joinType) {
- case INNER:
- return INNER;
- case LEFT:
- return LEFT;
- }
- throw new IllegalArgumentException(
- "Unsupported join type for semi-join " + joinType);
- }
-
- public JoinRelType toJoinType() {
- switch (this) {
- case INNER:
- return JoinRelType.INNER;
- case LEFT:
- return JoinRelType.LEFT;
- }
- throw new IllegalStateException(
- "Unable to convert " + this + " to JoinRelType");
- }
-
- public JoinType toLinq4j() {
- switch (this) {
- case INNER:
- return JoinType.INNER;
- case LEFT:
- return JoinType.LEFT;
- case SEMI:
- return JoinType.SEMI;
- case ANTI:
- return JoinType.ANTI;
- }
- throw new IllegalStateException(
- "Unable to convert " + this + " to JoinRelType");
- }
-
- public boolean returnsJustFirstInput() {
- switch (this) {
- case INNER:
- case LEFT:
- return false;
- case SEMI:
- case ANTI:
- return true;
- }
- throw new IllegalStateException(
- "Unable to convert " + this + " to JoinRelType");
- }
-}
-
-// End SemiJoinType.java