yr85804864 opened a new issue, #14113: URL: https://github.com/apache/dolphinscheduler/issues/14113
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened use hive no-query sql , the segmentSeparator is ";" , parse sql exception , see error log ------------------------------------------------------------------------------------------------------------------- [INFO] 2023-05-15 10:28:22.979 +0000 - Resources:{} check success [INFO] 2023-05-15 10:28:22.979 +0000 - Task plugin: SQL create success [INFO] 2023-05-15 10:28:22.979 +0000 - Success initialized task plugin instance success [INFO] 2023-05-15 10:28:22.979 +0000 - Success set taskVarPool: null [INFO] 2023-05-15 10:28:22.980 +0000 - Full sql parameters: SqlParameters{type='HIVE', datasource=2, sql='DROP TABLE test_11; DROP TABLE test_22;' , sqlType=1, sendEmail=null, displayRows=10, limit=0, segmentSeparator=;, udfs='', showType='null', connParams='null', groupId='0', title='null', preStatements=[], postStatements=[]} [INFO] 2023-05-15 10:28:22.980 +0000 - sql type : HIVE, datasource : 2, sql : DROP TABLE test_11; DROP TABLE test_22; SELECT id FROM test_33; , localParams : [],udfs : ,showType : null,connParams : null,varPool : [] ,query max result limit 0 [INFO] 2023-05-15 10:28:22.980 +0000 - can't find udf function resource [INFO] 2023-05-15 10:28:23.083 +0000 - prepare statement replace sql : DROP TABLE test_11;, sql parameters : {} [ERROR] 2023-05-15 10:28:23.090 +0000 - execute sql error: Error while compiling statement: FAILED: ParseException line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name [ERROR] 2023-05-15 10:28:23.090 +0000 - sql task error org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:267) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:253) at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:313) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:253) at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:490) at org.apache.hive.jdbc.HivePreparedStatement.executeUpdate(HivePreparedStatement.java:122) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeUpdate(SqlTask.java:312) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:210) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:161) at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerDelayTaskExecuteRunnable.executeTask(DefaultWorkerDelayTaskExecuteRunnable.java:49) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.run(WorkerTaskExecuteRunnable.java:174) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:341) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:216) at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:317) at org.apache.hive.service.cli.operation.Operation.run(Operation.java:251) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:718) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:704) at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78) at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1761) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) at com.sun.proxy.$Proxy58.executeStatementAsync(Unknown Source) at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:342) at org.apache.hive.service.cli.thrift.ThriftCLIService.executeNewStatement(ThriftCLIService.java:1146) at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:1282) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1550) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:231) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:84) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:76) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:692) at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:2503) at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:2450) at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:2445) at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:137) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:205) ... 27 common frames omitted [ERROR] 2023-05-15 10:28:23.090 +0000 - Task execute failed, due to meet an exception org.apache.dolphinscheduler.plugin.task.api.TaskException: Execute sql task failed at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:168) at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerDelayTaskExecuteRunnable.executeTask(DefaultWorkerDelayTaskExecuteRunnable.java:49) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.run(WorkerTaskExecuteRunnable.java:174) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:267) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:253) at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:313) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:253) at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:490) at org.apache.hive.jdbc.HivePreparedStatement.executeUpdate(HivePreparedStatement.java:122) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeUpdate(SqlTask.java:312) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:210) at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:161) ... 9 common frames omitted Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:341) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:216) at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:317) at org.apache.hive.service.cli.operation.Operation.run(Operation.java:251) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:718) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:704) at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78) at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1761) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) at com.sun.proxy.$Proxy58.executeStatementAsync(Unknown Source) at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:342) at org.apache.hive.service.cli.thrift.ThriftCLIService.executeNewStatement(ThriftCLIService.java:1146) at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:1282) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1550) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 2:21 cannot recognize input near 'test_11' ';' '<EOF>' in table name at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:231) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:84) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:76) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:692) at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:2503) at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:2450) at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:2445) at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:137) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:205) ... 27 common frames omitted [INFO] 2023-05-15 10:28:23.091 +0000 - Get a exception when execute the task, will send the task execute result to master, the current task execute result is TaskExecutionStatus{code=6, desc='failure'} ### What you expected to happen hive sql success ### How to reproduce create a hive task , use more then one no-query sql , and split use ";" example: DROP TABLE test_11; DROP TABLE test_22; ### Anything else version 3.1.5 ### Version 3.1.x ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
