if (call != null) { result.add( new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION)); sig = sig.replaceAll("'", ""); result.add( new SqlMonikerImpl( sig, SqlMonikerType.FUNCTION)); new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION));
for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN)); for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN));
public void findAliases(Collection<SqlMoniker> result) { for (ScopeChild child : children) { result.add(new SqlMonikerImpl(child.name, SqlMonikerType.TABLE)); } parent.findAliases(result); }
public void findAliases(Collection<SqlMoniker> result) { for (ScopeChild child : children) { result.add(new SqlMonikerImpl(child.name, SqlMonikerType.TABLE)); } parent.findAliases(result); }
private SqlMonikerImpl moniker(CalciteSchema schema, String name, SqlMonikerType type) { final List<String> path = schema.path(name); if (path.size() == 1 && !schema.root().name.equals("") && type == SqlMonikerType.SCHEMA) { type = SqlMonikerType.CATALOG; } return new SqlMonikerImpl(path, type); }
private SqlMonikerImpl moniker(CalciteSchema schema, String name, SqlMonikerType type) { final List<String> path = schema.path(name); if (path.size() == 1 && !schema.root().name.equals("") && type == SqlMonikerType.SCHEMA) { type = SqlMonikerType.CATALOG; } return new SqlMonikerImpl(path, type); }
@Override public List<SqlMoniker> getAllSchemaObjectNames(List<String> names) { final List<SqlMoniker> result = new ArrayList<>(); result.add(new SqlMonikerImpl(Arrays.asList("TEST_CATALOG"), SqlMonikerType.CATALOG)); result.add(new SqlMonikerImpl(Arrays.asList("TEST_SCHEMA"), SqlMonikerType.SCHEMA)); result.add(new SqlMonikerImpl(Arrays.asList("TEST_TABLE"), SqlMonikerType.TABLE)); return result; }
/** * Given fully qualified schema name, return schema object names. * When paramList is empty, the contents of root schema should be returned. */ @Override public List<SqlMoniker> getAllSchemaObjectNames(List<String> paramList) { final List<SqlMoniker> result = new ArrayList<>(); for (String currSchema : catalog.listSchemas(new NamespaceKey(paramList))) { // If paramList is not empty, we only want the datasets held by this schema, // Therefore don't add the schema to the results. if (paramList.isEmpty()) { result.add(new SqlMonikerImpl(currSchema, SqlMonikerType.SCHEMA)); } // Get dataset names for each schema. for (Table dataset : catalog.listDatasets(new NamespaceKey(currSchema))) { result.add(new SqlMonikerImpl(Arrays.asList(dataset.TABLE_SCHEMA, dataset.TABLE_NAME), SqlMonikerType.TABLE)); } } return result; }
&& tokenName.endsWith("\"")) { hintList.add( new SqlMonikerImpl( tokenName.substring(1, tokenName.length() - 1), SqlMonikerType.KEYWORD));
protected void addColumnNames( SqlValidatorNamespace ns, List<SqlMoniker> colNames) { final RelDataType rowType; try { rowType = ns.getRowType(); } catch (Error e) { // namespace is not good - bail out. return; } for (RelDataTypeField field : rowType.getFieldList()) { colNames.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN)); } }
&& tokenName.endsWith("\"")) { hintList.add( new SqlMonikerImpl( tokenName.substring(1, tokenName.length() - 1), SqlMonikerType.KEYWORD));
protected void addColumnNames( SqlValidatorNamespace ns, List<SqlMoniker> colNames) { final RelDataType rowType; try { rowType = ns.getRowType(); } catch (Error e) { // namespace is not good - bail out. return; } for (RelDataTypeField field : rowType.getFieldList()) { colNames.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN)); } }
if (call != null) { result.add( new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION)); sig = sig.replaceAll("'", ""); result.add( new SqlMonikerImpl( sig, SqlMonikerType.FUNCTION)); new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION));
new SqlMonikerImpl(ImmutableList.of("*"), SqlMonikerType.KEYWORD); String hintToken = parserConfig.unquotedCasing() == Casing.TO_UPPER ? UPPER_HINT_TOKEN : HINT_TOKEN;
if (call != null) { result.add( new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION)); sig = sig.replaceAll("'", ""); result.add( new SqlMonikerImpl( sig, SqlMonikerType.FUNCTION)); new SqlMonikerImpl( op.getName(), SqlMonikerType.FUNCTION));
new SqlMonikerImpl(ImmutableList.of("*"), SqlMonikerType.KEYWORD); String hintToken = parserConfig.unquotedCasing() == Casing.TO_UPPER ? UPPER_HINT_TOKEN : HINT_TOKEN;
for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN)); for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN));
for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN)); for (RelDataTypeField field : rowType.getFieldList()) { hintList.add( new SqlMonikerImpl( field.getName(), SqlMonikerType.COLUMN));