5815 return call.getOperator().validateOperands(
5821 RelDataType
type = null;
5822 if (!(
scope instanceof EmptyScope)) {
5823 id = scope.fullyQualify(id).identifier;
5828 for (i =
id.names.size() - 1; i > 0; i--) {
5837 final SqlNameMatcher nameMatcher = catalogReader.nameMatcher();
5838 final SqlValidatorScope.ResolvedImpl resolved =
5839 new SqlValidatorScope.ResolvedImpl();
5840 scope.resolve(id.names.subList(0, i), nameMatcher,
false, resolved);
5841 if (resolved.count() == 1) {
5843 final SqlValidatorScope.Resolve resolve = resolved.only();
5844 type = resolve.rowType();
5845 for (SqlValidatorScope.Step p : Util.skip(resolve.path.steps())) {
5846 type = type.getFieldList().
get(p.i).getType();
5854 if (type == null ||
id.names.size() == 1) {
5857 RelDataType colType = scope.resolveColumn(id.names.get(0),
id);
5858 if (colType != null) {
5865 final SqlIdentifier last = id.getComponent(i - 1, i);
5867 RESOURCE.unknownIdentifier(last.toString()));
5871 for (; i < id.names.size(); i++) {
5872 String
name = id.names.get(i);
5873 final RelDataTypeField
field;
5874 if (name.equals(
"")) {
5880 final SqlNameMatcher nameMatcher = catalogReader.nameMatcher();
5881 field = nameMatcher.field(
type,
name);
5883 if (field == null) {
5885 RESOURCE.unknownField(name));
5887 type = field.getType();
5890 SqlTypeUtil.addCharsetAndCollation(
SqlValidatorImpl(SqlOperatorTable opTab, SqlValidatorCatalogReader catalogReader, RelDataTypeFactory typeFactory, Config config)
SqlCall makeNullaryCall(SqlIdentifier id)
CalciteContextException newValidationError(SqlNode node, Resources.ExInst< SqlValidatorException > e)
RelDataTypeFactory getTypeFactory()
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
final SqlValidatorScope scope