Description
Test (SqlAdvisorTest):
@Test public void testNestSchema() throws Exception { String sql; sql = "select * from sales.n^"; assertComplete( sql, ...); }
Expected output: "SALES.NEST" schema and tables inside and so on
Actual output: empty.
The thing is it properly uses n for prefix search, however it uses hint.toString() and it fails for multi-name identifiers:
// Regular identifier. Case-insensitive match. for (SqlMoniker hint : completionHints) { String cname = hint.toString(); if ((cname.length() >= word.length()) && cname.substring(0, word.length()).equalsIgnoreCase(word)) { result.add(hint); } }
Hints are like "CATALOG.SALES.NEST", and they fail cname.substring(0, word.length()).equalsIgnoreCase(word) check
Attachments
Issue Links
- links to