Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2474

SqlAdvisor: NPE in lookupFromHints where FROM is empty

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.18.0
    • Component/s: core
    • Labels:
      None

      Description

      select * from^
      java.lang.NullPointerException
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.getNamespace(SqlValidatorImpl.java:1070)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.lookupFromHints(SqlValidatorImpl.java:707)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.lookupSelectHints(SqlValidatorImpl.java:685)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.lookupSelectHints(SqlValidatorImpl.java:698)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.lookupHints(SqlValidatorImpl.java:652)
      	at org.apache.calcite.sql.advise.SqlAdvisor.getCompletionHints(SqlAdvisor.java:350)
      	at org.apache.calcite.sql.advise.SqlAdvisor.getCompletionHints0(SqlAdvisor.java:210)
      	at org.apache.calcite.sql.advise.SqlAdvisor.getCompletionHints(SqlAdvisor.java:173)
      	at org.apache.calcite.sql.test.SqlAdvisorTest.assertComplete(SqlAdvisorTest.java:498)
      	at org.apache.calcite.sql.test.SqlAdvisorTest.testAdviceEmptyFrom(SqlAdvisorTest.java:1349)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.apache.calcite.test.SqlValidatorTestCase$TesterConfigurationRule$1.evaluate(SqlValidatorTestCase.java:663)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vladimirsitnikov Vladimir Sitnikov
                Reporter:
                vladimirsitnikov Vladimir Sitnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: