There’s an existing test for this, and it passes. And I added some more in 
https://github.com/julianhyde/calcite/commit/831318278e0ecccf814b82eb8a944544874275a6
 
<https://github.com/julianhyde/calcite/commit/831318278e0ecccf814b82eb8a944544874275a6>.
 How is your case (or environment) different from these?

> On Jan 20, 2022, at 2:40 AM, mark <[email protected]> wrote:
> 
> Hello,
> Please can I ask for some help or guidance with SqlAdvisor and completion?
> My problem is that I can get completion working for table names, but not
> column names.
> 
>  "select a.mgr from ^stuff a"
> 
> gives me good results:  CATALOG.SALES.EMP, CATALOG.SALES, etc, but
> 
>  "select a.^ from sales.emp a"
> 
> gives me only "*". See
> https://github.com/mnuttall/sql-testing/blob/main/src/main/java/test/AdvisorBuilder.java
> for how I'm constructing my SqlAdvisor and
> https://github.com/mnuttall/sql-testing/blob/main/src/test/java/test/TestCompletion.java
> for some simple test code.
> 
> Can anyone tell me - should I be able to get column name suggestions from
> org.apache.calcite.sql.advise.SqlAdvisor.getCompletionHints() for a string
> like "select a.^ from sales.emp a" ? Can anyone see what's wrong with my
> SqlAdvisor construction? Very many thanks in advance - I'm a bit stuck : /
> 
> Regards,
> 
> Mark

Reply via email to