[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-752823570 Looks like there is another better solution from yanghong. I will close this. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Cube Set shardBy to true to `KYLIN_SALES.SELLER_ID` . ### Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Error Log ```java 2020-12-01 09:49:27,262 ERROR [Query c43e8817-e24d-6230-8857-cc0c2092ef5e-59] service.QueryService:576 : Exception while executing query java.sql.SQLException: Error while executing SQL "select * from (SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10) limit 5": Index: 4, Size: 1 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:1010) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:706) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:225) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:514) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:474) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:402) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 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.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:854) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:765) 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:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 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
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Cube Set shardBy to true to `KYLIN_SALES.SELLER_ID` . ### Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Error Log ```java 2020-12-01 09:49:27,262 ERROR [Query c43e8817-e24d-6230-8857-cc0c2092ef5e-59] service.QueryService:576 : Exception while executing query java.sql.SQLException: Error while executing SQL "select * from (SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10) limit 5": Index: 4, Size: 1 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:1010) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:706) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:225) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:514) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:474) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:402) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 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.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:854) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:765) 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:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 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
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Cube Set shardBy to true to `KYLIN_SALES.SELLER_ID` . ### Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Error Log ```java 2020-12-01 09:49:27,262 ERROR [Query c43e8817-e24d-6230-8857-cc0c2092ef5e-59] service.QueryService:576 : Exception while executing query java.sql.SQLException: Error while executing SQL "select * from (SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10) limit 5": Index: 4, Size: 1 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:1010) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:706) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:225) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:514) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:474) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:402) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 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.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:854) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:765) 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:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 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
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Cube Set shardBy to true to `KYLIN_SALES.SELLER_ID`. ## Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Error Log ```java 2020-12-01 09:49:27,262 ERROR [Query c43e8817-e24d-6230-8857-cc0c2092ef5e-59] service.QueryService:576 : Exception while executing query java.sql.SQLException: Error while executing SQL "select * from (SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10) limit 5": Index: 4, Size: 1 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:1010) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:706) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:225) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:514) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:474) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:402) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 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.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:854) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:765) 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:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 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
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Cube Set shardBy to true to `KYLIN_SALES.SELLER_ID`. ## Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Error Log ```java 2020-12-01 09:49:27,262 ERROR [Query c43e8817-e24d-6230-8857-cc0c2092ef5e-59] service.QueryService:576 : Exception while executing query java.sql.SQLException: Error while executing SQL "select * from (SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10) limit 5": Index: 4, Size: 1 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:1010) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:706) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:225) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:514) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:474) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:402) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 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.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:854) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:765) 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:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 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
[GitHub] [kylin] hit-lacus edited a comment on pull request #1493: KYLIN-4823 Fix duplicate groupBy columns in OLAPAggregateRel
hit-lacus edited a comment on pull request #1493: URL: https://github.com/apache/kylin/pull/1493#issuecomment-735928205 ## Reproduce SQL ```sql SELECT SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END AS dyna_group, SUM(PRICE) FROM KYLIN_SALES GROUP BY SELLER_ID, CASE WHEN LSTG_SITE_ID > 1 then LSTG_SITE_ID + 0.3 else LSTG_SITE_ID END HAVING SUM(PRICE)>10 ``` ### Cause Analysis 1. Having Filter is wrong, should be `price` not `LSTG_SITE_ID` ! Let's see what happen ? https://user-images.githubusercontent.com/14030549/100642316-993b7b80-3373-11eb-88cf-b1a7db7044e8.png;> 2. Fetch duplicate column in TupleExpression, two `LSTG_SITE_ID`. https://user-images.githubusercontent.com/14030549/100642470-c556fc80-3373-11eb-9601-0e2ac26f3c90.png;> 3. Add same column(`LSTG_SITE_ID`) to groupBy column twice. https://user-images.githubusercontent.com/14030549/100642615-f1727d80-3373-11eb-977a-a530e2ab36f6.png;> 4. Start to create a having TupleFilter https://user-images.githubusercontent.com/14030549/100642787-31d1fb80-3374-11eb-9acc-babce32c535b.png;> 5. `$2` is wrong because https://user-images.githubusercontent.com/14030549/100642872-5201ba80-3374-11eb-872f-b44c46e85b80.png;> This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org