Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4228

Not a valid ID: xxx while executing SQL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: v3.0.0-beta
    • Fix Version/s: None
    • Component/s: Query Engine
    • Labels:
      None

      Description

      Executing the SQL with "case when" maybe cause the following error:
      Not a valid ID: xxx while executing SQL
      null while executing SQL

      Can be fixed by setting "kylin.query.enable-dynamic-column" to Ture

              at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
              at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
              at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:163)
              at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:227)
              at org.apache.kylin.rest.service.QueryService.executeRequest(QueryService.java:969)
              at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:672)
              at org.apache.kylin.rest.service.QueryService.query(QueryService.java:218)
              at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:479)
              at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:439)
              at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:377)
              at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93)
              at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
              at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
              at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
              at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209)
              at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException
              at java.nio.Buffer.position(Buffer.java:244)
              at org.apache.kylin.gridtable.GTRecord.loadColumns(GTRecord.java:282)
              at org.apache.kylin.storage.gtrecord.PartitionResultIterator.next(PartitionResultIterator.java:56)
              at org.apache.kylin.storage.gtrecord.PartitionResultIterator.next(PartitionResultIterator.java:35)
              at com.google.common.collect.Iterators$5.next(Iterators.java:607)
              at org.apache.kylin.storage.gtrecord.SegmentCubeTupleIterator$2.next(SegmentCubeTupleIterator.java:130)
              at org.apache.kylin.storage.gtrecord.SegmentCubeTupleIterator$2.next(SegmentCubeTupleIterator.java:122)
              at org.apache.kylin.storage.gtrecord.SegmentCubeTupleIterator.hasNext(SegmentCubeTupleIterator.java:162)
              at com.google.common.collect.Iterators$5.hasNext(Iterators.java:596)
              at org.apache.kylin.storage.gtrecord.SequentialCubeTupleIterator.hasNext(SequentialCubeTupleIterator.java:144)
              at org.apache.kylin.query.enumerator.OLAPEnumerator.moveNext(OLAPEnumerator.java:63)
              at Baz$1$1.moveNext(Unknown Source)
              at org.apache.calcite.linq4j.EnumerableDefaults.distinct(EnumerableDefaults.java:449)
              at org.apache.calcite.linq4j.DefaultEnumerable.distinct(DefaultEnumerable.java:206)
              at Baz.bind(Unknown Source)
              at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:365)
              at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:301)
              at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:559)
              at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:550)
              at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:182)
              at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:67)
              at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:44)
              at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:667)
              at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:619)
              at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:675)
              at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
              ... 79 more
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                temple.zhou Temple Zhou
                Reporter:
                temple.zhou Temple Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: