5812 return call.getOperator().validateOperands(
5818 RelDataType
type = null;
5819 if (!(
scope instanceof EmptyScope)) {
5820 id = scope.fullyQualify(id).identifier;
5825 for (i =
id.names.size() - 1; i > 0; i--) {
5834 final SqlNameMatcher nameMatcher = catalogReader.nameMatcher();
5835 final SqlValidatorScope.ResolvedImpl resolved =
5836 new SqlValidatorScope.ResolvedImpl();
5837 scope.resolve(id.names.subList(0, i), nameMatcher,
false, resolved);
5838 if (resolved.count() == 1) {
5840 final SqlValidatorScope.Resolve resolve = resolved.only();
5841 type = resolve.rowType();
5842 for (SqlValidatorScope.Step p : Util.skip(resolve.path.steps())) {
5843 type = type.getFieldList().
get(p.i).getType();
5851 if (type == null ||
id.names.size() == 1) {
5854 RelDataType colType = scope.resolveColumn(id.names.get(0),
id);
5855 if (colType != null) {
5862 final SqlIdentifier last = id.getComponent(i - 1, i);
5864 RESOURCE.unknownIdentifier(last.toString()));
5868 for (; i < id.names.size(); i++) {
5869 String
name = id.names.get(i);
5870 final RelDataTypeField
field;
5871 if (name.equals(
"")) {
5877 final SqlNameMatcher nameMatcher = catalogReader.nameMatcher();
5878 field = nameMatcher.field(
type,
name);
5880 if (field == null) {
5882 RESOURCE.unknownField(name));
5884 type = field.getType();
5887 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