Skip to content

Conversation

@zerolbsony
Copy link
Contributor

Avoid invoke their max and min statistics function on the Blob and TEXT type, because they don't support filter comparison with value of string type in the where clause.

This is a failure IT test case:
img_v3_02tg_f34da319-82e6-402f-98d5-9f4543cc8ddg
2025-12-31 10:27:14,930 [Query-Worker-Thread-10$20251231_022714_71241_1.1.0.1] WARN o.a.i.d.q.e.s.AbstractDriverThread:95 - [ExecuteFailed]
org.apache.tsfile.exception.filter.StatisticsClassException: TEXT statistics does not support: max
at org.apache.tsfile.file.metadata.statistics.BinaryStatistics.getMaxValue(BinaryStatistics.java:103)
at org.apache.tsfile.file.metadata.statistics.BinaryStatistics.getMaxValue(BinaryStatistics.java:38)
at org.apache.tsfile.read.filter.operator.StringFilterOperators$ValueGtEq.canSkip(StringFilterOperators.java:468)
at java.base/java.util.Optional.map(Optional.java:260)
at org.apache.tsfile.read.filter.basic.ValueFilter.canSkip(ValueFilter.java:148)
at org.apache.iotdb.db.queryengine.execution.operator.source.SeriesScanUtil.filterFirstChunkMetadata(SeriesScanUtil.java:424)
at org.apache.iotdb.db.queryengine.execution.operator.source.SeriesScanUtil.hasNextChunk(SeriesScanUtil.java:407)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.readChunkData(AbstractSeriesScanOperator.java:113)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.readFileData(AbstractSeriesScanOperator.java:105)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.hasNext(AbstractSeriesScanOperator.java:81)
at org.apache.iotdb.db.queryengine.execution.operator.Operator.hasNextWithTimer(Operator.java:72)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.processInternal(Driver.java:240)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.lambda$processFor$1(Driver.java:152)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.tryWithLock(Driver.java:337)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.processFor(Driver.java:133)
at org.apache.iotdb.db.queryengine.execution.schedule.DriverTaskThread.execute(DriverTaskThread.java:83)
at org.apache.iotdb.db.queryengine.execution.schedule.AbstractDriverThread.run(AbstractDriverThread.java:79)
2025-12-31 10:27:14,929 [pool-36-IoTDB-ClientRPC-Processor-1] WARN o.a.i.d.u.ErrorHandlingUtils:127 - Status code: 301, Query Statement: "select s1 from root.alter.construct_and_alter_column_type where s1 >= '1' and s2 > '2' order by time". executeStatement failed because TEXT statistics does not support: max
org.apache.iotdb.commons.exception.IoTDBException: org.apache.tsfile.exception.filter.StatisticsClassException: TEXT statistics does not support: max
at org.apache.iotdb.db.queryengine.plan.execution.QueryExecution.dealWithException(QueryExecution.java:479)
at org.apache.iotdb.db.queryengine.plan.execution.QueryExecution.getResult(QueryExecution.java:452)
at org.apache.iotdb.db.queryengine.plan.execution.QueryExecution.getByteBufferBatchResult(QueryExecution.java:498)
at org.apache.iotdb.db.utils.QueryDataSetUtils.convertQueryResultByFetchSize(QueryDataSetUtils.java:625)
at org.apache.iotdb.db.protocol.thrift.impl.ClientRPCServiceImpl.lambda$static$0(ClientRPCServiceImpl.java:281)
at org.apache.iotdb.db.protocol.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:460)
at org.apache.iotdb.db.protocol.thrift.impl.ClientRPCServiceImpl.executeStatementV2(ClientRPCServiceImpl.java:965)
at org.apache.iotdb.db.protocol.thrift.impl.ClientRPCServiceImpl.executeQueryStatementV2(ClientRPCServiceImpl.java:955)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeQueryStatementV2.getResult(IClientRPCService.java:4054)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeQueryStatementV2.getResult(IClientRPCService.java:4034)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.iotdb.db.protocol.thrift.ProcessorWithMetrics.process(ProcessorWithMetrics.java:64)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: org.apache.tsfile.exception.filter.StatisticsClassException: TEXT statistics does not support: max
at org.apache.tsfile.file.metadata.statistics.BinaryStatistics.getMaxValue(BinaryStatistics.java:103)
at org.apache.tsfile.file.metadata.statistics.BinaryStatistics.getMaxValue(BinaryStatistics.java:38)
at org.apache.tsfile.read.filter.operator.StringFilterOperators$ValueGtEq.canSkip(StringFilterOperators.java:468)
at java.base/java.util.Optional.map(Optional.java:260)
at org.apache.tsfile.read.filter.basic.ValueFilter.canSkip(ValueFilter.java:148)
at org.apache.iotdb.db.queryengine.execution.operator.source.SeriesScanUtil.filterFirstChunkMetadata(SeriesScanUtil.java:424)
at org.apache.iotdb.db.queryengine.execution.operator.source.SeriesScanUtil.hasNextChunk(SeriesScanUtil.java:407)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.readChunkData(AbstractSeriesScanOperator.java:113)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.readFileData(AbstractSeriesScanOperator.java:105)
at org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator.hasNext(AbstractSeriesScanOperator.java:81)
at org.apache.iotdb.db.queryengine.execution.operator.Operator.hasNextWithTimer(Operator.java:72)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.processInternal(Driver.java:240)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.lambda$processFor$1(Driver.java:152)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.tryWithLock(Driver.java:337)
at org.apache.iotdb.db.queryengine.execution.driver.Driver.processFor(Driver.java:133)
at org.apache.iotdb.db.queryengine.execution.schedule.DriverTaskThread.execute(DriverTaskThread.java:83)
at org.apache.iotdb.db.queryengine.execution.schedule.AbstractDriverThread.run(AbstractDriverThread.java:79)

…XT type, because they don't support filter comparison with value of string type in the where clause.
@JackieTien97 JackieTien97 merged commit 6a8e944 into apache:develop Jan 3, 2026
11 checks passed
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