public SqlNode validate(SqlNode sqlNode) throws ValidationException { ensure(State.STATE_3_PARSED); final SqlConformance conformance = conformance(); final CalciteCatalogReader catalogReader = createCatalogReader(); this.validator = new CalciteSqlValidator(operatorTable, catalogReader, typeFactory, conformance); this.validator.setIdentifierExpansion(true); try { validatedSqlNode = validator.validate(sqlNode); } catch (RuntimeException e) { throw new ValidationException(e); } state = State.STATE_4_VALIDATED; return validatedSqlNode; }
public SqlNode validate(SqlNode sqlNode) throws ValidationException { ensure(State.STATE_3_PARSED); final SqlConformance conformance = conformance(); final CalciteCatalogReader catalogReader = createCatalogReader(); this.validator = new CalciteSqlValidator(operatorTable, catalogReader, typeFactory, conformance); this.validator.setIdentifierExpansion(true); try { validatedSqlNode = validator.validate(sqlNode); } catch (RuntimeException e) { throw new ValidationException(e); } state = State.STATE_4_VALIDATED; return validatedSqlNode; }
final SqlConformance conformance = conformance(); final CalciteCatalogReader catalogReader = createCatalogReader().withSchemaPath(schemaPath);