diff --git a/core/src/main/java/org/apache/calcite/sql/validate/JoinNamespace.java b/core/src/main/java/org/apache/calcite/sql/validate/JoinNamespace.java index f651047cb..49f428304 100644 --- a/core/src/main/java/org/apache/calcite/sql/validate/JoinNamespace.java +++ b/core/src/main/java/org/apache/calcite/sql/validate/JoinNamespace.java @@ -44,8 +44,9 @@ protected RelDataType validateImpl(RelDataType targetRowType) { RelDataType leftType = validator.getNamespace(join.getLeft()).getRowType(); - // Since LATERALS are used preceding subqueries appearing in FROM to allow the subquery to - // reference columns provided by preceding FROM items, LATERALS will only appear on the right side of a join. + // Since LATERALS are used preceding subqueries in FROM to allow the subquery to + // reference columns provided by preceding FROM items, LATERALS will only appear + // on the right side of a join. SqlNode right; if (join.getRight().getKind() == SqlKind.LATERAL) { // Skip over fetching for LATERAL's name space since they are not registered diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java index c2cca192d..249bd7e7a 100644 --- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java +++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java @@ -59,7 +59,6 @@ import org.apache.calcite.sql.SqlIntervalQualifier; import org.apache.calcite.sql.SqlJoin; import org.apache.calcite.sql.SqlKind; -import org.apache.calcite.sql.SqlLateralOperator; import org.apache.calcite.sql.SqlLiteral; import org.apache.calcite.sql.SqlMatchRecognize; import org.apache.calcite.sql.SqlMerge; @@ -136,7 +135,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import static org.apache.calcite.rel.rel2sql.SqlImplementor.*; +import static org.apache.calcite.rel.rel2sql.SqlImplementor.POS; import static org.apache.calcite.sql.SqlUtil.stripAs; import static org.apache.calcite.util.Static.RESOURCE; @@ -3151,8 +3150,9 @@ protected void validateFrom( // Validate the namespace representation of the node, just in case the // validation did not occur implicitly. if (node.getKind() == SqlKind.LATERAL) { - // Skip over fetching for LATERAL namespace since they are not registered, use subquery instead - getNamespace(((SqlCall) node).operand(0), scope).validate(targetRowType); + // Skip over fetching for LATERAL namespace since they aren't registered, use subquery instead + getNamespace(((SqlCall) node).operand(0), scope) + .validate(targetRowType); } else { getNamespace(node, scope).validate(targetRowType); }