Skip to content

Fix unexcepted error message when use raw query with Group By Tag#9593

Merged
JackieTien97 merged 1 commit intoapache:masterfrom
Wei-hao-Li:fixTag
Apr 14, 2023
Merged

Fix unexcepted error message when use raw query with Group By Tag#9593
JackieTien97 merged 1 commit intoapache:masterfrom
Wei-hao-Li:fixTag

Conversation

@Wei-hao-Li
Copy link
Collaborator

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)

Signed-off-by: Weihao Li <18110526956@163.com>
Copy link
Member

@liuminghui233 liuminghui233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :-)

@JackieTien97 JackieTien97 merged commit 2ae6ae9 into apache:master Apr 14, 2023
@Wei-hao-Li Wei-hao-Li deleted the fixTag branch April 14, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants