Fix unexcepted error message when use raw query with Group By Tag#9593
Merged
JackieTien97 merged 1 commit intoapache:masterfrom Apr 14, 2023
Merged
Fix unexcepted error message when use raw query with Group By Tag#9593JackieTien97 merged 1 commit intoapache:masterfrom
JackieTien97 merged 1 commit intoapache:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cause: forget to add SemanticCheck
origin jira: https://jira.infra.timecho.com:8443/browse/TIMECHODB-74
content of jira:
Msg: 305: [INTERNAL_SERVER_ERROR(305)] Exception occurred: "select s_19 from root.test.g_0.** where time=1535587210000 group by tags(workshop,city)". executeStatement failed. org.apache.iotdb.db.mpp.plan.expression.leaf.TimeSeriesOperand cannot be cast to org.apache.iotdb.db.mpp.plan.expression.multi.FunctionExpression
测试流程:
启动1C3D ,1副本 IoT协议
benchmark运行附件配置
给序列s_19 add tags
cli 执行查询
./sbin/start-cli.sh -h 172.20.70.2 -e "select s_19 from root.test.g_0.** where time=1535587210000 group by tags(workshop,city);"
Msg: 305: [INTERNAL_SERVER_ERROR(305)] Exception occurred: "select s_19 from root.test.g_0.** where time=1535587210000 group by tags(workshop,city)". executeStatement failed. org.apache.iotdb.db.mpp.plan.expression.leaf.TimeSeriesOperand cannot be cast to org.apache.iotdb.db.mpp.plan.expression.multi.FunctionExpression
datanode的warn log:
2023-04-04 13:47:45,982 [pool-31-IoTDB-ClientRPC-Processor-33] WARN o.a.i.d.u.ErrorHandlingUtils:61 - Status code: INTERNAL_SERVER_ERROR(305), operation: "select s_19 from root.test.g_0.** where time=1535587210000 group by tags(workshop,city)". executeStatement failed
java.lang.ClassCastException: org.apache.iotdb.db.mpp.plan.expression.leaf.TimeSeriesOperand cannot be cast to org.apache.iotdb.db.mpp.plan.expression.multi.FunctionExpression
at org.apache.iotdb.db.mpp.plan.analyze.AnalyzeVisitor.analyzeGroupByTag(AnalyzeVisitor.java:816)
at org.apache.iotdb.db.mpp.plan.analyze.AnalyzeVisitor.visitQuery(AnalyzeVisitor.java:317)
at org.apache.iotdb.db.mpp.plan.analyze.AnalyzeVisitor.visitQuery(AnalyzeVisitor.java:192)
at org.apache.iotdb.db.mpp.plan.statement.crud.QueryStatement.accept(QueryStatement.java:595)
at org.apache.iotdb.db.mpp.plan.statement.StatementVisitor.process(StatementVisitor.java:117)
at org.apache.iotdb.db.mpp.plan.analyze.Analyzer.analyze(Analyzer.java:48)
at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.analyze(QueryExecution.java:285)
at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.(QueryExecution.java:157)
at org.apache.iotdb.db.mpp.plan.Coordinator.createQueryExecution(Coordinator.java:114)
at org.apache.iotdb.db.mpp.plan.Coordinator.execute(Coordinator.java:148)
at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:223)
at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementV2(ClientRPCServiceImpl.java:484)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3861)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3841)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.iotdb.db.service.thrift.ProcessorWithMetrics.process(ProcessorWithMetrics.java:64)
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)