running-elephant / datart

Datart is a next generation Data Visualization Open Platform
https://running-elephant.github.io/datart-docs/
Apache License 2.0
1.99k stars 592 forks source link

The sql limit value exceeds the max limit of maxSqlRows #1403

Open zhile005 opened 2 years ago

zhile005 commented 2 years ago

Datart Version 1.0.0-beta.3

Describe the bug 2022-06-01 11:38:27.112 [http-nio-127.0.0.1-8081-exec-9] INFO d.data.provider.jdbc.DataSourceFactoryDruidImpl : druid data source created (DataSource-1448201827) 2022-06-01 11:38:27.118 [http-nio-127.0.0.1-8081-exec-9] INFO com.alibaba.druid.pool.DruidDataSource : {dataSource-7} inited 2022-06-01 11:38:27.127 [http-nio-127.0.0.1-8081-exec-9] ERROR datart.server.config.WebExceptionHandler : [Alarm] The sql limit value exceeds the max limit of maxSqlRows=200000 java.sql.SQLSyntaxErrorException: [Alarm] The sql limit value exceeds the max limit of maxSqlRows=200000 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1198) at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:296) at datart.data.provider.jdbc.adapters.JdbcDataProviderAdapter.execute(JdbcDataProviderAdapter.java:165) at datart.data.provider.jdbc.adapters.JdbcDataProviderAdapter.executeOnSource(JdbcDataProviderAdapter.java:341) at datart.data.provider.jdbc.adapters.JdbcDataProviderAdapter.execute(JdbcDataProviderAdapter.java:204) at datart.data.provider.JdbcDataProvider.execute(JdbcDataProvider.java:84) at datart.data.provider.ProviderManager.run(ProviderManager.java:181) at datart.data.provider.optimize.DataProviderExecuteOptimizer.runOptimize(DataProviderExecuteOptimizer.java:47) at datart.data.provider.ProviderManager.execute(ProviderManager.java:94) at datart.server.service.impl.DataProviderServiceImpl.execute(DataProviderServiceImpl.java:259) at datart.server.controller.DataProviderController.execute(DataProviderController.java:101) at sun.reflect.GeneratedMethodAccessor180.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:197) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:887) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) x^[[11~2022-06-01 11:41:32.308 [http-nio-127.0.0.1-8081-exec-7] ERROR datart.server.config.WebExceptionHandler : [Alarm] The sql limit value exceeds the max limit of maxSqlRows=200000 java.sql.SQLSyntaxErrorException: [Alarm] The sql limit value exceeds the max limit of maxSqlRows=200000 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

To Reproduce mysql5.7版本的数据,通过新建数据图表的时候报错

scottsut commented 2 years ago

请提供数据视图中的 SQL 语句样例,以及新建图表时的操作步骤,帮助复现问题。从错误来看,是 SQL 语句长度超过了 20 万行,我们也想知道为什么会这么长