Java Code Examples for org.apache.calcite.sql.SqlJoin#getJoinType()
The following examples show how to use
org.apache.calcite.sql.SqlJoin#getJoinType() .
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: FlinkCalciteSqlValidator.java From flink with Apache License 2.0 | 6 votes |
@Override protected void validateJoin(SqlJoin join, SqlValidatorScope scope) { // Due to the improper translation of lateral table left outer join in Calcite, we need to // temporarily forbid the common predicates until the problem is fixed (see FLINK-7865). if (join.getJoinType() == JoinType.LEFT && SqlUtil.stripAs(join.getRight()).getKind() == SqlKind.COLLECTION_TABLE) { final SqlNode condition = join.getCondition(); if (condition != null && (!SqlUtil.isLiteral(condition) || ((SqlLiteral) condition).getValueAs(Boolean.class) != Boolean.TRUE)) { throw new ValidationException( String.format( "Left outer joins with a table function do not accept a predicate such as %s. " + "Only literal TRUE is accepted.", condition)); } } super.validateJoin(join, scope); }
Example 2
Source File: FlinkCalciteSqlValidator.java From flink with Apache License 2.0 | 6 votes |
@Override protected void validateJoin(SqlJoin join, SqlValidatorScope scope) { // Due to the improper translation of lateral table left outer join in Calcite, we need to // temporarily forbid the common predicates until the problem is fixed (see FLINK-7865). if (join.getJoinType() == JoinType.LEFT && SqlUtil.stripAs(join.getRight()).getKind() == SqlKind.COLLECTION_TABLE) { final SqlNode condition = join.getCondition(); if (condition != null && (!SqlUtil.isLiteral(condition) || ((SqlLiteral) condition).getValueAs(Boolean.class) != Boolean.TRUE)) { throw new ValidationException( String.format( "Left outer joins with a table function do not accept a predicate such as %s. " + "Only literal TRUE is accepted.", condition)); } } super.validateJoin(join, scope); }
Example 3
Source File: JoinInfo.java From sylph with Apache License 2.0 | 5 votes |
JoinInfo(SqlJoin sqlJoin, TableName leftTable, TableName rightTable, boolean leftIsBatch, boolean rightIsBatch) { this.sqlJoin = sqlJoin; this.leftIsBatch = leftIsBatch; this.rightIsBatch = rightIsBatch; this.joinType = sqlJoin.getJoinType(); this.leftTable = leftTable; this.rightTable = rightTable; }