switch (node.getKind()) { case AS: validateFrom( ((SqlCall) node).operand(0), targetRowType,
final JoinConditionType conditionType = join.getConditionType(); final SqlValidatorScope joinScope = scopes.get(join); validateFrom(left, unknownType, joinScope); validateFrom(right, unknownType, joinScope);
validateFrom(select.getFrom(), fromType, fromScope);
protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { try { super.validateFrom(node, targetRowType, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { try { super.validateFrom(node, targetRowType, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
switch (node.getKind()) { case AS: validateFrom( ((SqlCall) node).operand(0), targetRowType,
switch (node.getKind()) { case AS: validateFrom( ((SqlCall) node).operand(0), targetRowType,
@Override protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { switch (node.getKind()) { case AS: SqlNode sqlNode = ((SqlCall) node).operand(0); switch (sqlNode.getKind()) { case IDENTIFIER: SqlIdentifier tempNode = (SqlIdentifier) sqlNode; DrillCalciteCatalogReader catalogReader = (SqlConverter.DrillCalciteCatalogReader) getCatalogReader(); changeNamesIfTableIsTemporary(tempNode); // Check the schema and throw a valid SchemaNotFound exception instead of TableNotFound exception. if (catalogReader.getTable(tempNode.names) == null) { catalogReader.isValidSchema(tempNode.names); } break; case UNNEST: if (((SqlCall) node).operandCount() < 3) { throw RESOURCE.validationError("Alias table and column name are required for UNNEST").ex(); } } } super.validateFrom(node, targetRowType, scope); }
final JoinConditionType conditionType = join.getConditionType(); final SqlValidatorScope joinScope = scopes.get(join); validateFrom(left, unknownType, joinScope); validateFrom(right, unknownType, joinScope);
final JoinConditionType conditionType = join.getConditionType(); final SqlValidatorScope joinScope = scopes.get(join); validateFrom(left, unknownType, joinScope); validateFrom(right, unknownType, joinScope);
validateFrom(select.getFrom(), fromType, fromScope);
validateFrom(select.getFrom(), fromType, fromScope);