apache / apache/iotdb

[Bug] 特定场景 SELECT last * from 语句报错

未关闭
#16,249 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
6.4k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
115

描述

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

2.0.5

### Describe the bug and provide the minimal reproduce step

SELECT last * from root.xx.yy where Time < 1756080000000 and Time > 1755910000000
时能正常查到数据
SELECT last * from root.xx.yy where Time < 1756080000000 and Time > 1755010000000
时间范围变化后,报错:
SQL 错误 [301]: 301: null

类似的
select last `y1`.*,y2.*
from root.xx where Time >= 1756080000000
能查到数据
select last `y1`.*,y2.*
from root.xx
不带条件报错:
SQL 错误 [305] [[INTERNAL_SERVER_ERROR(305)] Exception occurred: "select last `y1`.*,y2.*
from root.xx ". executeStatement failed. Index 4 out of bounds for length 4]: 305: [INTERNAL_SERVER_ERROR(305)] Exception occurred: "select last `y1`.*,y2.*
from root.xx ". executeStatement failed. Index 4 out of bounds for length 4

### What did you expect to see?

无论条件如何,语法没错,不应该报错。另外2.0.2版本没发现这个问题

### What did you see instead?

SQL 错误 [301]
SQL 错误 [305]

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

贡献指南

打开贡献指南

调研方向

首先在 IoTDB 2.0.5 上复现两个 SELECT last 查询,然后将它们的行为与 2.0.2 版本进行比较。跟踪产生错误 301 和 305 的查询路径,包括报告的 index-out-of-bounds 失败;当两种查询形式都能在所述时间范围内且不带条件成功执行时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, sql
领域
databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。