SchemaPlus rootSchema = optiqConnection.getRootSchema();
rootSchema.add("hr", new ReflectiveSchema(new HrSchema()));
SchemaPlus schema = rootSchema.add("s", new AbstractSchema());
optiqConnection.setSchema("hr");
final TableFunction table =
new SqlAdvisorGetHintsFunction();
schema.add("get_hints", table);
PreparedStatement ps = connection.prepareStatement(
"select *\n"
+ "from table(\"s\".\"get_hints\"(?, ?)) as t(id, names, type)");
SqlParserUtil.StringAndPos sap = SqlParserUtil.findPos(sql);